BPKCalendarDelegate
@protocol BPKCalendarDelegate <NSObject>
Delegate for configuring and respodning to interactions in a calendar.
-
Called when a date selection changed.
Declaration
Objective-C
- (void)calendar:(nonnull BPKCalendar *)calendar didChangeDateSelection:(nonnull NSArray<BPKSimpleDate *> *)dateList;Swift
func calendar(_ calendar: BPKCalendar!, didChangeDateSelection dateList: Any!)Parameters
calendarThe backpack calendar.
dateListList of selected dates.
-
Called when the calendar was scrolled
Declaration
Objective-C
- (void)calendar:(nonnull BPKCalendar *)calendar didScroll:(CGPoint)contentOffset;Swift
optional func calendar(_ calendar: BPKCalendar!, didScroll contentOffset: Any!)Parameters
calendarThe backpack calendar.
contentOffsetThe content offset
-
Called when the calendar renders each cell.
Declaration
Objective-C
- (BOOL)calendar:(nonnull BPKCalendar *)calendar isDateEnabled:(nonnull BPKSimpleDate *)date;Swift
optional func calendar(_ calendar: BPKCalendar!, isDateEnabled date: BPKSimpleDate!) -> Any!Parameters
calendarThe backpack calendar.
dateThe date to check for enabledness.
Return Value
Whether the cell for the given date is enabled.
-
Asks the delegate for cell data for a specific date.
Declaration
Objective-C
- (id _Nullable)calendar:(nonnull BPKCalendar *)calendar cellDataForDate:(nonnull BPKSimpleDate *)date;Swift
optional func calendar(_ calendar: BPKCalendar!, cellDataFor date: BPKSimpleDate!) -> Any?Parameters
calendarThe backpack calendar requesting the data.
dateThe date to provide the data for.
Return Value
The cell data to use for this date.
BPKCalendarDelegate Protocol Reference