-
Notifications
You must be signed in to change notification settings - Fork 808
8.0.0 MIGRATION GUIDE
JTAppleCalendar edited this page Jun 28, 2019
·
4 revisions
Changes in version 8.0.0 are mainly that the function names are changed. why? We now support YearView. because of this, distiction has to be made between yearView and monthView. **Important: ** Because the names of some function have changed, if you forget to change their names you might notice things like "my functions are not being called". If you are experiencing this, changes are you did not change the names.
func calendar(_ calendar: JTACMonthView, shouldSelectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) -> Bool { return true }
func calendar(_ calendar: JTACMonthView, shouldDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) -> Bool { return true }
func calendar(_ calendar: JTACMonthView, didSelectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {}
func calendar(_ calendar: JTACMonthView, didDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {}
func calendar(_ calendar: JTACMonthView, didHighlightDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {}
func calendar(_ calendar: JTACMonthView, didUnhighlightDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {}
func calendar(_ calendar: JTACMonthView, willScrollToDateSegmentWith visibleDates: DateSegmentInfo) {}
func calendar(_ calendar: JTACMonthView, didScrollToDateSegmentWith visibleDates: DateSegmentInfo) {}
func calendar(_ calendar: JTACMonthView, headerViewForDateRange range: (start: Date, end: Date), at indexPath: IndexPath) -> JTACMonthReusableView {}
func calendarDidScroll(_ calendar: JTACMonthView) {}
func calendarSizeForMonths(_ calendar: JTACMonthView?) -> MonthSize? { return nil }
func sizeOfDecorationView(indexPath: IndexPath) -> CGRect { return .zero }
func scrollDidEndDecelerating(for calendar: JTACMonthView) {}
JTApplecalendarView --> JTACMonthView
JTAppleCalendarViewDelegate --> JTACMonthViewDelegate
JTAppleCalendarViewDataSource --> JTACMonthViewDataSource
JTAppleDayCell --> JTACMonthCell
JTAppleCollectionReusableView --> JTACMonthReusableView
If you used storyboards/xibs, remember to change the name of the classes in there as well. If we missed out any thing that caused the transition experience to be complicated, then open an issue and let us know right away. It will be fixed.