Skip to content

Simple and Easy-to-Use iOS Swift Date and Options Picker

License

Notifications You must be signed in to change notification settings

zhishidapang/RPicker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPicker

Elegant and Easy-to-Use iOS Swift Date and Options Picker. Clone Swift_4.2 branch for swift version 4.2

Alt text Alt text Alt text Alt text

How to use

Add RPicker.swift into your project. You are ready to go!

// Simple Date Picker
RPicker.selectDate { (selectedDate) in
            // TODO: Your implementation for date
        }            

// Simple Date Picker with title
RPicker.selectDate(title: "Select Date", didSelectDate: { (selectedDate) in
            // TODO: Your implementation for date
        })
        
// Simple Date Picker with min and max validation
RPicker.selectDate(title: "Select Date", hideCancel: true, minDate: Date(), maxDate: Date().dateByAddingYears(5), didSelectDate: { (selectedDate) in
            // TODO: Your implementation for date
        })      

// Simple Time Picker
RPicker.selectDate(title: "Select Time", datePickerMode: .time, didSelectDate: { (selectedDate) in
            // TODO: Your implementation for date
        })

// Simple Date and Time Picker
RPicker.selectDate(title: "Select Date & Time", datePickerMode: .dateAndTime, minDate: Date(), maxDate: Date().dateByAddingYears(5), didSelectDate: { (selectedDate) in
            // TODO: Your implementation for date
        })
        
// Simple Option Picker
let dummyList = ["Apple", "Orange", "Banana", "Mango"]
RPicker.selectOption(dataArray: dummyList) { (selctedText, atIndex) in
            // TODO: Your implementation for selection
        }
        
// Simple Option Picker with selected index
RPicker.selectOption(title: "Select", hideCancel: true, dataArray: dummyList, selectedIndex: 2) { (selctedText, atIndex) in
            // TODO: Your implementation for selection
        }

Author

Communication

  • If you found a bug, open an issue.
  • If you want to contribute, submit a pull request.

License

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

About

Simple and Easy-to-Use iOS Swift Date and Options Picker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%