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
state
The 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
textColor
The color of the text to use for the specified state.
state
The 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
state
The 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
backgroundColor
The color of the background to use for the specified state.
state
The state that uses the specified color.
-
TitleStyle
Extension methodSee
CPCViewTitleStyle
.Declaration
Swift
public typealias TitleStyle = CPCViewTitleStyle
-
DayCellState
Extension methodSee
CPCDayCellState
.Declaration
Swift
public typealias DayCellState = CPCDayCellState
-
Selection
Extension methodSee
CPCViewSelection
.Declaration
Swift
public typealias Selection = CPCViewSelection
-
CellRenderer
Extension methodSee
CPCDayCellRenderer
.Declaration
Swift
public typealias CellRenderer = CPCDayCellRenderer
-
allowsSelection
Extension 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
day
Day to append.
-
select(_:)
Extension methodAppends a range of consecutive days to the specified selection.
Declaration
Swift
public func select<R>(_ range: R) where R : CPCDateInterval
Parameters
range
Days 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 == CPCDay
Parameters
range
Days to append.
-
select(_:)
Extension methodAppends days contained within given collection to the specified selection.
Declaration
Parameters
range
Days 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 == CPCDay
Parameters
ordered
Days to append.
-
select(_:)
Extension methodAppends days from given collection to the specified selection.
Declaration
Parameters
unordered
Days to append.
-
deselect(_:)
Extension methodRemoves a single day from the specified selection.
Declaration
Swift
public func deselect(_ day: CPCDay)
Parameters
day
Day 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 : CPCDateInterval
Parameters
range
Days 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 == CPCDay
Parameters
range
Days to remove from selection.
-
deselect(_:)
Extension methodRemoves a consecutive range of days from the specified selection.
Declaration
Parameters
range
Days 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 == CPCDay
Parameters
ordered
Days to append.
-
deselect(_:)
Extension methodRemoves days from given collection from the specified selection.
Declaration
Parameters
ordered
Days to append.