项目介绍:
JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)
功能:
- 边界日期 – 限制日历日期范围
- 周/月模式 – 显示1行工作日。或2,3或6
- 自定义单元格 – 可以自定义你想要的任何功能
- 自定义日历视图 – 让您的日历可以自定义你想要的任何功能
- 一周的第一天 – 挑任何一天是星期的第一天
- 水平或垂直模式
- 能够在不同尺寸/风格你喜欢的月份添加页眉
- 只需使用日期滚动到任何一个月
- Ability to design your calendar however you want. You want it, you build it
- Complete Documentation
使用方法:
[Objective-C] 查看源文件 复制代码
User functions public func reloadData() public func reloadDates(dates: [NSDate]) public func scrollToNextSegment() public func scrollToPreviousSegment() public func scrollToDate() public func selectDates() public func cellStatusForDateAtRow(row: Int, column: Int) -> CellState? public func currentCalendarDateSegment() -> (startDate: NSDate, endDate: NSDate) public func scrollToHeaderForDate(date: NSDate) Properties you can configure // Note: You do not need to configure your calendar with this if it is already the default calendarView.direction = .Horizontal // default is horizontal calendarView.numberOfRowsPerMonth // default is 6. This is now setup in the configure Datasource Delegate Methhod calendarView.cellInset = CGPoint(x: 0, y: 0) // default is (3,3) calendarView.allowsMultipleSelection = false // default is false calendarView.bufferTop = 0 // default is 0. - still work in progress calendarView.bufferBottom = 0 // default is 0. - still work in progress calendarView.firstDayOfWeek = .Sunday // default is Sunday calendarView.scrollEnabled = true // default is true calendarView.pagingEnabled = true // default is true calendarView.scrollResistance = 0.75 // default is 0.75 - this is only applicable when paging is not enabled
DEMO 直接下载: