Latest 1.1.1
Homepage https://github.com/hongxinhope/TBRepeatPicker
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit
Authors

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!

Latest podspec

{
    "name": "TBRepeatPicker",
    "version": "1.1.1",
    "summary": "An event repeat rule picker similar to iOS system calendar.",
    "homepage": "https://github.com/hongxinhope/TBRepeatPicker",
    "license": {
        "type": "MIT",
        "file": "LICENSE.txt"
    },
    "authors": {
        "Xin Hong": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hongxinhope/TBRepeatPicker.git",
        "tag": "1.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "TBRepeatPicker/*.swift",
    "resource_bundles": {
        "TBRepeatPicker": [
            "TBRepeatPicker/Resources/*/*.png",
            "TBRepeatPicker/Resources/*/*.lproj"
        ]
    },
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This