CPCMonthViewSelectionDelegate
public protocol CPCMonthViewSelectionDelegate : AnyObject
Use a selection delegate (a custom object that implements this protocol) to modify behavior of a view when user interacts with it.
-
Selected days associated with this view.
Declaration
Swift
var selection: CPCViewSelection { get set } -
This method is called after view selection is being reset programmatically (e. g. by changing represented month).
Declaration
Swift
func monthViewDidClearSelection(_ monthView: CPCMonthView)Parameters
monthViewView for which selection was reset.
-
Tells the delegate that a specific cell is about to be selected by user.
The delegate must updated stored
selectionvalue according to the desired selection scheme and return whether the resulting selection was somehow changed.Declaration
Swift
func monthView(_ monthView: CPCMonthView, shouldSelect day: CPCDay) -> BoolParameters
monthViewView to handle user interaction for.
dayDay value rendered by the interacted cell.
Return Value
trueif user actions have lead to an updated selection value; otherwise,false. -
Tells the delegate that a specific cell is about to be deselected by user.
The delegate must updated stored
selectionvalue according to the desired selection scheme and return whether the resulting selection was somehow changed.Declaration
Swift
func monthView(_ monthView: CPCMonthView, shouldDeselect day: CPCDay) -> BoolParameters
monthViewView to handle user interaction for.
dayDay value rendered by the interacted cell.
Return Value
trueif user actions have lead to an updated selection value; otherwise,false.
View on GitHub
Install in Dash
CPCMonthViewSelectionDelegate Protocol Reference