Skip to content

TBRepeatPicker is an event repeat rule picker similar to iOS system calendar.(Keywords: repeat/recurrence/rrule)

License

Notifications You must be signed in to change notification settings

Jonge/TBRepeatPicker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#TBRepeatPicker TBRepeatPicker is an event repeat rule picker similar to iOS system calendar. You can easily apply it in your project and you'll be happy to do it!

Screenshot

Screenshot

Screenshot

##How To Get Started

Podfile

platform :ios, '8.0'
pod "TBRepeatPicker"

###Usage

1. Create and present TBRepeatPicker
// give the occurrence date of event
let dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd"
occurrenceDate = dateFormatter.dateFromString("2015-09-25")!

// init picker
let repeatPicker = TBRepeatPicker.initPicker(occurrenceDate, language: .English, tintColor: UIColor.blueColor())

// assign a recurrence to the picker, you can pass nil or do nothing here when the repeat rule is "Never".
repeatPicker.recurrence = TBRecurrence.initMonthly(1, selectedMonthdays: [3, 17], occurrenceDate: occurrenceDate)

// set delegate
repeatPicker.delegate = self

// push picker
navigationController?.pushViewController(repeatPicker, animated: true)

Note: You should always use push segue here to present the picker, TBRepeatPicker doesn't support other segues such as modal.

2. Implement didPickRecurrence delegate
func didPickRecurrence(recurrence: TBRecurrence?, repeatPicker: TBRepeatPicker) {
    // do something
}

Minimum Requirement

iOS 8.0

Localization

TBRepeatPicker supports 5 languages: English, SimplifiedChinese, TraditionalChinese, Korean, Japanese. You can set the language when init.

Swift and Objective-C

TBRepeatPicker support both Swift and Objective-C.

in Objective-C, you just need to import a header like this:

#import "MyApp-Swift.h"

Release Notes

License

TBRepeatPicker is released under the MIT license. See LICENSE for details.

More Info

Have a question? Please open an issue!

About

TBRepeatPicker is an event repeat rule picker similar to iOS system calendar.(Keywords: repeat/recurrence/rrule)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 99.2%
  • Ruby 0.8%