Latest 1.0.0
Homepage https://github.com/shubham14896/SGSelectionModal
License MIT
Platforms ios 11.0
Frameworks UIKit
Authors

SGSelectionModal

SGSelection Modal

SGSelection Modal is a lightweight framework for Selecting out single/multiple value from a list.

Version
Swift 3.0
License
Author Shubham Gupta

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’

Manually

Download following files & add to your project.

  • SGModal.swift.
  • SGModalItem.swift.
  • SGRadioButton.swift.

Usage example

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()
}

Preview

SGSelectionModal
SGSelectionModal

Contribute

Any contribution to SGSelection Modal will be appreciated, check the LICENSE file for more info.

Meta

Shubham Gupta – @shubham14896[email protected]

Distributed under the MIT license. See LICENSE for more information.

https://github.com/shubham14896

Latest podspec

{
    "name": "SGSelectionModal",
    "version": "1.0.0",
    "summary": "Selection/Picker inside UIModal for iOS, Made in Swift",
    "description": "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 etc made by Shubham Gupta",
    "homepage": "https://github.com/shubham14896/SGSelectionModal",
    "license": "MIT",
    "authors": {
        "Shubham Gupta": "[email protected]"
    },
    "social_media_url": "https://twitter.com/Shubham14896",
    "platforms": {
        "ios": "11.0"
    },
    "source": {
        "git": "https://github.com/shubham14896/SGSelectionModal.git",
        "tag": "1.0.0"
    },
    "source_files": "SGSelectionModal/**/*",
    "frameworks": "UIKit",
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This