FUICalendarViewDelegate
public protocol FUICalendarViewDelegate : AnyObject
This protocol provides methods for handling actions based on the state of the FUICalendarView
.
-
This method is called after the calendar view has been scrolled.
In the case of
month
style, the next section is the previous month or the next month depending upon the direction of the scroll. In the case ofweek
style, it is the next (or previous) set of 7 dates.Default implementation is provided that does nothing.
Declaration
Swift
func calendarView(_ calendarView: FUICalendarView, didChangeVisibleDatesTo visibleDates: FUIVisibleDates)
-
This method is called when a date is selected in
month
,week
, andexpandable
styles.In the case of
rangeSelection
anddatesSelection
, this method is not called. Rather, thecalendarView(: didChangeSelections:)
is called any time the selected date range changes.Default implementation is provided that does nothing.
Declaration
Swift
func calendarView(_ calendarView: FUICalendarView, didSelectDate date: Date, cell: FUICalendarItemCollectionViewCell)
-
This method is called when a date is deselected in
month
,week
, andexpandable
styles.In the case of
rangeSelectionView
, this method is not called. Rather, thecalendarView(: didChangeSelections:)
is called any time the selected date range changes.Default implementation is provided that does nothing.
Declaration
Swift
func calendarView(_ calendarView: FUICalendarView, didDeselectDate date: Date, cell: FUICalendarItemCollectionViewCell)
-
This method is called before a cell is displayed.
Default implementation is provided that does nothing.
Declaration
Swift
func calendar(_ calendarView: FUICalendarView, willDisplay cell: FUICalendarItemCollectionViewCell, forItemAt date: Date, indexPath: IndexPath)
-
This method is called each time the title is updated due to user actions, such as scrolling to the next section, or selecting or deselecting a date.
Default implementation is provided that does nothing.
Declaration
Swift
func calendarView(_ calendarView: FUICalendarView, didChangeTitleTo title: String)
-
This method is called when a date (in
month
,week
,expandable
, anddatesSelection
) or date range (inrangeSelectionView
) selection is changed.Declaration
Swift
func calendarView(_ calendarView: FUICalendarView, didChangeSelections selections: [FUIDateSelection])