Skip to content

idrish-rishabhsoft/SwiftPicker-fork

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftPicker

CI Status Version License Platform

Requirements

Swift 5.1+

Installation

SwiftPicker is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SwiftPicker'

Usage

Picker for a text

import SwiftPicker
class ViewController: UIViewController {
    @IBOutlet weak var pickerContainer: UIView!
    private var pickerView: SwiftTextPicker?
    override func viewDidLoad() {
        super.viewDidLoad()
        pickerView = SwiftTextPicker(in: pickerContainer, parentViewController: self, pickerSections: [], id: "1")
        pickerView?.delegate = self
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}

extension ViewController: SwiftPickerDelegate {
    func onDone(name: String?, results: [PickerResult]) {
        // code when press Done Button
    }
    
    func onChange(name: String?, result: PickerResult) {
        //code when select item in picker
    }
}

Author

notovel2, [email protected]

License

SwiftPicker is available under the MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 86.8%
  • Ruby 13.2%