iOS多彩日歷組件:EPCalendarPicker
EPCalendarPicker 是 iOS 彩色日歷組件,Swift 編寫。
Installation
CocoaPods
EPCalendarPicker is available on CocoaPods. Just add the following to your project Podfile:
pod 'EPCalendarPicker' use_frameworks!
Manual Installation
Just drag and drop theEPCalendarPickerfolder into your project
Demo
Stream the demo of this example in browser using Appetize.io
Features
EPcalendarPicker provides lot of features which lets you customize the picker
- Single selection and multiselection option
- Customize the date colors in the picker
- Today Indication and Scrolling to today
- Delegates that return the selected dates
- Ability to set the starting and ending year of the calendar
Initialization
You can init the picker as follows
let calendarPicker = EPCalendarPicker(startYear: 2015, endYear: 2017, multiSelection: true) calendarPicker.calendarDelegate = self let navigationController = UINavigationController(rootViewController: calendarPicker) self.presentViewController(navigationController, animated: true, completion: nil)
Properties
Name | Description |
---|---|
tintColor | Tintcolor of the navigationBar bar buttons |
weekdayTintColor | Weekday title and date color |
weekendTintColor | Weekend title and date color |
todayTintColor | Today bar button the today's date color |
dateSelectionColor | Selected date color |
monthTitleColor | Month title color |
multiSelectEnabled | Boolan value indicating whether multiselection enabled or not |
calendarDelegate | Delegate |
startYear | Starting year of the calendar |
endYear | Ending year of the calendar |
Delegates
EPCalendarPicker provides you three delegates for getting the callbacks on the picker
optional func epCalendarPicker(_: EPCalendarPicker, didCancel error : NSError) optional func epCalendarPicker(_: EPCalendarPicker, didSelectDate date : NSDate) optional func epCalendarPicker(_: EPCalendarPicker, didSelectMultipleDate dates : [NSDate])
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!