SGSelection Modal is a lightweight framework for Selecting out single/multiple value from a list.
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.
- Single Select.
- Dynamic Width.
- Works on Landscape & Portrait Mode.
- Initiate with Selected Index.
- iOS 11.0+
- Xcode 9.0
- Swift 3.0+
Add following pod to project podfile.
pod ’SGSelectionModal’
Download following files & add to your project.
- SGModal.swift.
- SGModalItem.swift.
- SGRadioButton.swift.
import SGSelectionModal
var 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()
}
Any contribution to SGSelection Modal will be appreciated, check the LICENSE
file for more info.
Shubham Gupta – @shubham14896 – shubham9032@gmail.com
Distributed under the MIT license. See LICENSE
for more information.