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.

  • allowsSelection Extension method

    Boolean flag indicating whether selection may be extended by user.

    Declaration

    Swift

    public var allowsSelection: Bool { get set }
  • select(_:) Extension method

    Appends a single day to the specified selection.

    Declaration

    Swift

    public func select(_ day: CPCDay)

    Parameters

    day

    Day to append.

  • select(_:) Extension method

    Appends 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 method

    Appends 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 method

    Appends days contained within given collection to the specified selection.

    Declaration

    Swift

    public func select<R>(_ range: R) where R : RandomAccessCollection, R : RangeExpression, R.Bound == CPCDay, R.Element == CPCDay

    Parameters

    range

    Days to append.

  • select(_:) Extension method

    Appends 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 method

    Appends days from given collection to the specified selection.

    Declaration

    Swift

    public func select<C>(_ unordered: C) where C : Collection, C : SetAlgebra, C.Element == CPCDay, C.Element == CPCDay

    Parameters

    unordered

    Days to append.

  • deselect(_:) Extension method

    Removes a single day from the specified selection.

    Declaration

    Swift

    public func deselect(_ day: CPCDay)

    Parameters

    day

    Day to remove from selection.

  • deselect(_:) Extension method

    Removes 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 method

    Removes 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 method

    Removes a consecutive range of days from the specified selection.

    Declaration

    Swift

    public func deselect<R>(_ range: R) where R : RandomAccessCollection, R : RangeExpression, R.Bound == CPCDay, R.Element == CPCDay

    Parameters

    range

    Days to remove from selection.

  • deselect(_:) Extension method

    Removes 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 method

    Removes days from given collection from the specified selection.

    Declaration

    Swift

    public func deselect<C>(_ unordered: C) where C : Collection, C : SetAlgebra, C.Element == CPCDay, C.Element == CPCDay

    Parameters

    ordered

    Days to append.