MBCalendarKit v5.1.0 Release Notes
Release Date: 2017-09-11 // over 6 years ago-
➕ Added
- ➕ Added a demo for first day of the week handling.
- ➕ Added a demo for animated week transitions.
🔄 Changed
- 🛠 Fixes for
firstWeekday
bug. (#73, #110, #127) - 🛠 Fix infinite loop in
CKCalendarViewController
's delegate implementation. - If we try to set the view model's
date
to the same exact date that it already is, we return. This avoids firing off an entire layout pass. - 🖨
CKCalendarCell
now takes an integer forsetNumber
instead of anNSNumber
. This method uses aasprintf
to format the string. This can be faster in some cases. - 📄 Use
[NSLayoutConstraint activateConstraints:]
instead of[self addConstraints:]
inCKCalendarHeaderView
. The docs say thatactivateConstraints:
is more efficient. - 👉 Use the ivar for getting the cell identifier inside
CKGridView
instead of the property accessor. - Compute the
initialOffset
once in the calendar model and cache it on the flow layout subclass, to avoid duplicating this computation per cell. CKCalendarView
now checks forself.window
before reloading.- Calling
setDate:
onCKCalendarModel
passing a date that is the same day as the current date will short circuit after clamping to minimum/maximum dates, and the delegate methods will not get called. - No longer call
reload
inCKCalendarView
's init. We call it later in the object's lifecycle anyway. - ✂ Removed calls to
super
intouchesBegan:
,touchesMoved:
and friends. Much faster! - Cache
firstVisibleDate
andlastVisibleDate
- Cache the font used in the
CKCalendarCell
class. - Cache
CKCalendarModel
'sdateForIndexPath
andindexPathForDate
values. - Cache drawn polygon images in the next/back buttons.