FUICalendarViewDelegate
public protocol FUICalendarViewDelegate : AnyObject
This protocol provides methods for handling actions based on the FUICalendarView State.
-
This method is called after the calendar view has scrolled. In the case of monthView, the next section is the previous month or the next month depending upon the direction of the scroll. In the case of week View, it is the next ( or previous) set of 7 dates.
Declaration
Swift
func calendarView(_ calendarView: FUICalendarView, didChangeVisibleDatesTo visibleDates: FUIVisibleDates)
Parameters
visibleDates
The dates currently displayed on the screen.
-
This method is called when a date is selected.
Declaration
Swift
func calendarView(_ calendarView: FUICalendarView, didSelectDate date: Date, cell: FUICalendarItemCollectionViewCell)
Parameters
date
The selected date
cell
FUICalendarItemCollectionViewCell of the calendarView
-
This method is called when a date is deselected.
Declaration
Swift
func calendarView(_ calendarView: FUICalendarView, didDeselectDate date: Date, cell: FUICalendarItemCollectionViewCell)
Parameters
date
The deselected date
cell
FUICalendarItemCollectionViewCell of the calendarView
-
This method is called before a cell is displayed.
Declaration
Swift
func calendar(_ calendarView: FUICalendarView, willDisplay cell: FUICalendarItemCollectionViewCell, forItemAt date: Date, indexPath: IndexPath)
Parameters
cell
FUICalendarItemCollectionViewCell of the calendarView
date
The date that will be displayed in the cell.
-
This method is called each time the title is updated due to user actions such as scrolling to the next section , selecting or deselecting a date.
Declaration
Swift
func calendarView(_ calendarView: FUICalendarView, didChangeTitleTo title: String)
Parameters
title
The current title string