https://github.com/shubham14896/sgselectionmodal
A lightweight framework built for selecting out a single/multiple values from a list.
https://github.com/shubham14896/sgselectionmodal
ios modal pickerview popup selection state-list-drawable swift4
Last synced: about 1 month ago
JSON representation
A lightweight framework built for selecting out a single/multiple values from a list.
- Host: GitHub
- URL: https://github.com/shubham14896/sgselectionmodal
- Owner: shubham14896
- License: mit
- Created: 2018-09-10T08:24:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-15T13:27:13.000Z (over 6 years ago)
- Last Synced: 2025-03-25T22:21:59.713Z (about 2 months ago)
- Topics: ios, modal, pickerview, popup, selection, state-list-drawable, swift4
- Language: Swift
- Homepage:
- Size: 428 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SGSelection Modal
> SGSelection Modal is a lightweight framework for Selecting out single/multiple value from a list.


## About
Having trouble selecting out which state/city/{list} user/{entity} belongs to ??? Here's what you need, A lightweight framework built for selecting out a single/multiple values from a list.Built in using UIView, UIAnimations, ScrollView, UIButton. Initiate a object, add items to object, override closures and you are good to go.
## Features
- Single Select.
- Dynamic Width.
- Works on Landscape & Portrait Mode.
- Initiate with Selected Index.## Requirements
- iOS 11.0+
- Xcode 9.0
- Swift 3.0+## Installation
#### CocoaPods
Add following pod to project podfile.
````
pod ’SGSelectionModal’
````
#### ManuallyDownload following files & add to your project.
- SGModal.swift.
- SGModalItem.swift.
- SGRadioButton.swift.## Usage example
````
import SGSelectionModalvar selectedIndex: Int = 0
func showModal(){
let modal = SGModal(title: "Select Country", closeButtonTitle: "Close")
modal.width = 300
modal.selectedIndex = selectedIndex
for (index, state) in StateList.states.enumerated() {
modal.addItem(item: state) {
() in
print(state)
self.selectedIndex = index
}
}
modal.show()
}
````
## Preview![]()
## Contribute
Any contribution to **SGSelection Modal** will be appreciated, check the ``LICENSE`` file for more info.
## MetaShubham Gupta – [@shubham14896](https://twitter.com/Shubham14896) – [email protected]
Distributed under the MIT license. See ``LICENSE`` for more information.
[https://github.com/shubham14896](https://github.com/shubham14896/)