CPCViewProtocol
public protocol CPCViewProtocol : AnyObject
Views conforming to this protocol perform rendering of calendar cells
-
The font used to display the title label.
Declaration
Swift
var titleFont: UIFont { get set } -
The color of the month title label.
Declaration
Swift
var titleColor: UIColor { get set } -
The technique to use for aligning the month title.
Declaration
Swift
var titleAlignment: NSTextAlignment { get set } -
Style describing the exact format to use when displaying month name.
Declaration
Swift
var titleStyle: TitleStyle { get set } -
The inset or outset margins for the rectangle around the month title label.
Declaration
Swift
var titleMargins: UIEdgeInsets { get set } -
The font used to display each day’s title.
Declaration
Swift
var dayCellFont: UIFont { get set } -
The color of separator lines between days.
Declaration
Swift
var separatorColor: UIColor { get set } -
Value describing currently selected days in this view.
Declaration
Swift
var selection: Selection { get set } -
Renderer that is used to draw each day cell.
Declaration
Swift
var cellRenderer: CellRenderer { get set } -
Returns the day cell text color used for a state.
Declaration
Swift
func dayCellTextColor(for state: DayCellState) -> UIColor?Parameters
stateThe state that uses the text color.
-
Sets the text color of the day cell to use for the specified state.
Declaration
Swift
func setDayCellTextColor(_ textColor: UIColor?, for state: DayCellState)Parameters
textColorThe color of the text to use for the specified state.
stateThe state that uses the specified color.
-
Returns the day cell background color used for a state.
Declaration
Swift
func dayCellBackgroundColor(for state: DayCellState) -> UIColor?Parameters
stateThe state that uses the background color.
-
Sets the background color of the day cell to use for the specified state.
Declaration
Swift
func setDayCellBackgroundColor(_ backgroundColor: UIColor?, for state: DayCellState)Parameters
backgroundColorThe color of the background to use for the specified state.
stateThe state that uses the specified color.
-
TitleStyleExtension methodSee
CPCViewTitleStyle.Declaration
Swift
public typealias TitleStyle = CPCViewTitleStyle -
DayCellStateExtension methodSee
CPCDayCellState.Declaration
Swift
public typealias DayCellState = CPCDayCellState -
SelectionExtension methodSee
CPCViewSelection.Declaration
Swift
public typealias Selection = CPCViewSelection -
CellRendererExtension methodSee
CPCDayCellRenderer.Declaration
Swift
public typealias CellRenderer = CPCDayCellRenderer
-
allowsSelectionExtension methodBoolean flag indicating whether selection may be extended by user.
Declaration
Swift
public var allowsSelection: Bool { get set } -
select(_:)Extension methodAppends a single day to the specified selection.
Declaration
Swift
public func select(_ day: CPCDay)Parameters
dayDay to append.
-
select(_:)Extension methodAppends a range of consecutive days to the specified selection.
Declaration
Swift
public func select<R>(_ range: R) where R : CPCDateIntervalParameters
rangeDays to append.
-
select(_:)Extension methodAppends a range of consecutive days to the specified selection.
Declaration
Swift
public func select<R>(_ range: R) where R : RangeExpression, R.Bound == CPCDayParameters
rangeDays to append.
-
select(_:)Extension methodAppends days contained within given collection to the specified selection.
Declaration
Parameters
rangeDays to append.
-
select(_:)Extension methodAppends days from given collection to the specified selection.
Declaration
Swift
public func select<C>(_ ordered: C) where C : RandomAccessCollection, C.Element == CPCDayParameters
orderedDays to append.
-
select(_:)Extension methodAppends days from given collection to the specified selection.
Declaration
Parameters
unorderedDays to append.
-
deselect(_:)Extension methodRemoves a single day from the specified selection.
Declaration
Swift
public func deselect(_ day: CPCDay)Parameters
dayDay to remove from selection.
-
deselect(_:)Extension methodRemoves a consecutive range of days from the specified selection.
Declaration
Swift
public func deselect<R>(_ range: R) where R : CPCDateIntervalParameters
rangeDays to remove from selection.
-
deselect(_:)Extension methodRemoves a consecutive range of days from the specified selection.
Declaration
Swift
public func deselect<R>(_ range: R) where R : RangeExpression, R.Bound == CPCDayParameters
rangeDays to remove from selection.
-
deselect(_:)Extension methodRemoves a consecutive range of days from the specified selection.
Declaration
Parameters
rangeDays to remove from selection.
-
deselect(_:)Extension methodRemoves days from given collection from the specified selection.
Declaration
Swift
public func deselect<C>(_ ordered: C) where C : RandomAccessCollection, C.Element == CPCDayParameters
orderedDays to append.
-
deselect(_:)Extension methodRemoves days from given collection from the specified selection.
Declaration
Parameters
orderedDays to append.
View on GitHub
Install in Dash
CPCViewProtocol Protocol Reference