Skip to content

A customizable alternative to UIPickerView or UIDatePicker in Swift.

Notifications You must be signed in to change notification settings

Memory2014/PickerView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PickerView

Requirements

It requires iOS 8.0+ and Swift 3.0+ .

Installation

Manually

You can install it manually just draging PickerView to your project.

Usage

Example Example

From Code

Create a new PickerView.

TextPicker:

        let view = ZYPickerView.init(title: "select something")
        view.pickerStyle = .Text
        view.titlesForComponents = [["1","2","3"],["one","two","three","four","five"],["😀","😃","🙂","😜","😊"]]
        view.doneAction = { item in
            print(item)
        }
        view.show()

or DatePicker:

       let view = ZYPickerView.init(title: "select date")
        view.pickerStyle = .Date
        view.doneAction = { date in
            print(date)
        }
        view.show()

And this is all.

Custom Appearance

you can customize the PickerView appearance .

//        view.toobarTitleTextColor = .red
//        view.toobarTitleFont = UIFont.systemFont(ofSize: 20)
//        view.toobarTintColor = UIColor.orange
//        view.toobarTextColor = .white
//        view.pickerStyle = .Text
//        view.textColor = .green
//        view.font = UIFont.systemFont(ofSize: 25)
//        view.widthsForComponents = [40,40,50]

License

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

About

A customizable alternative to UIPickerView or UIDatePicker in Swift.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages