CPCMonthView
open class CPCMonthView : UIControl, CPCViewProtocol
A view that is optimized for rendering a single month’s days grid and a title.
-
Month that is currently being rendered by this view.
Declaration
Swift
open var month: CPCMonth? { get set }
-
Represents subset of the given month which should be rendered by the view.
Declaration
Swift
open var enabledRegion: CountableRange<CPCDay>? { get set }
-
Declaration
Swift
@IBInspectable open dynamic var titleFont: UIFont { get set }
-
Declaration
Swift
@IBInspectable open dynamic var titleColor: UIColor { get set }
-
Declaration
Swift
@IBInspectable open dynamic var titleAlignment: NSTextAlignment { get set }
-
Declaration
Swift
open var titleStyle: TitleStyle { get set }
-
Declaration
Swift
@IBInspectable open dynamic var titleMargins: UIEdgeInsets { get set }
-
Declaration
Swift
@IBInspectable open dynamic var dayCellFont: UIFont { get set }
-
Declaration
Swift
@IBInspectable open dynamic var separatorColor: UIColor { get set }
-
A boolean flag indicating whether view leading separator must be drawn.
Declaration
Swift
@IBInspectable open dynamic var drawsLeadingSeparator: Bool { get set }
-
A boolean flag indicating whether view trailing separator must be drawn.
Declaration
Swift
@IBInspectable open dynamic var drawsTrailingSeparator: Bool { get set }
-
Declaration
Swift
open var cellRenderer: CPCDayCellRenderer { get set }
-
The object that acts as the selection delegate of this view.
Declaration
Swift
open var selectionDelegate: CPCMonthViewSelectionDelegate? { get set }
-
Undocumented
Declaration
Swift
internal var layout: Layout? { get }
-
Undocumented
Declaration
Swift
internal var selectionHandler: CPCViewSelectionHandlerProtocol { get set }
-
Undocumented
Declaration
Swift
internal var effectiveTitleFont: UIFont { get set }
-
Undocumented
Declaration
Swift
internal var effectiveTitleMargins: UIEdgeInsets { get set }
-
Undocumented
Declaration
Swift
internal var effectiveDayCellFont: UIFont { get set }
-
Undocumented
Declaration
Swift
internal let appearanceStorage: CPCMonthView.AppearanceStorage
-
Undocumented
Declaration
Swift
internal var isContentsFlippedHorizontally: Bool { get }
-
Undocumented
Declaration
Swift
internal var effectiveAppearanceStorage: AppearanceStorage { get }
-
Undocumented
Declaration
Swift
internal var monthViewsManager: CPCMonthViewsManager? { get set }
-
Undocumented
Declaration
Swift
internal var highlightedDayIndex: CPCMonthView.CellIndex? { get set }
-
Undocumented
Declaration
Swift
internal var needsFullAppearanceUpdate: Bool
-
Undocumented
Declaration
Swift
internal var contentSizeCategoryObserver: NSObjectProtocol?
-
Undocumented
Declaration
Swift
internal var usesAspectRatioConstraint: Bool { get set }
-
Undocumented
Declaration
Swift
public override init(frame: CGRect)
-
Initializes and returns a newly allocated view object with the specified months to be rendered and frame rectangle.
Declaration
Swift
public convenience init(frame: CGRect, month: CPCMonth?)
Parameters
frame
Frame to be used by this view.
month
Month value to be rendered by the view.
-
Undocumented
Declaration
Swift
public required init?(coder aDecoder: NSCoder)
-
Undocumented
Declaration
Swift
deinit
-
Declaration
Swift
@objc(dayCellTextColorForState:) open dynamic func dayCellTextColor(for state: DayCellState) -> UIColor?
-
Declaration
Swift
@objc(setDayCellTextColor:forState:) open dynamic func setDayCellTextColor(_ backgroundColor: UIColor?, for state: DayCellState)
-
Declaration
Swift
@objc(dayCellBackgroundColorForState:) open dynamic func dayCellBackgroundColor(for state: DayCellState) -> UIColor?
-
Declaration
Swift
@objc(setDayCellBackgroundColor:forState:) open dynamic func setDayCellBackgroundColor(_ backgroundColor: UIColor?, for state: DayCellState)
-
Undocumented
Declaration
Swift
open override func setContentCompressionResistancePriority(_ priority: UILayoutPriority, for axis: NSLayoutConstraint.Axis)
-
Undocumented
Declaration
Swift
open override func updateConstraints()
-
Undocumented
Declaration
Swift
open override func sizeThatFits(_ size: CGSize) -> CGSize
-
Discard a custom cell renderer that was set previously and use standard one supplied by the library.
Declaration
Swift
public func setDefaultCellRendeder()
-
Undocumented
Declaration
Swift
open override func draw(_ rect: CGRect)
-
Undocumented
Declaration
Swift
open override func beginTracking(_ touch: UITouch, with event: UIEvent?) -> Bool
-
Undocumented
Declaration
Swift
open override func continueTracking(_ touch: UITouch, with event: UIEvent?) -> Bool
-
Undocumented
Declaration
Swift
open override func endTracking(_ touch: UITouch?, with event: UIEvent?)
-
Undocumented
Declaration
Swift
open override func cancelTracking(with event: UIEvent?)
-
Undocumented
Declaration
Swift
internal func removeFromMultiMonthViewsManager()
-
Undocumented
Declaration
Swift
open var adjustsFontForContentSizeCategory: Bool { get set }
-
Undocumented
Declaration
Swift
internal func adjustValues(for newCategory: UIContentSizeCategory)
-
See
selection
.Declaration
Swift
@objc(selection) open var _objcBridgedSelection: __CPCViewSelection { get set }
-
Declaration
Swift
open var selection: CPCViewSelection { get set }
-
Undocumented
Declaration
Swift
internal func selectionValue(of delegate: CPCMonthViewSelectionDelegate) -> Selection
-
Undocumented
Declaration
Swift
internal func setSelectionValue(_ selection: Selection, in delegate: CPCMonthViewSelectionDelegate)
-
Undocumented
Declaration
Swift
internal func resetSelection(in delegate: CPCMonthViewSelectionDelegate)
-
Undocumented
Declaration
Swift
internal func handlerShouldSelectDayCell(_ day: CPCDay, delegate: CPCMonthViewSelectionDelegate) -> Bool
-
Undocumented
Declaration
Swift
internal func handlerShouldDeselectDayCell(_ day: CPCDay, delegate: CPCMonthViewSelectionDelegate) -> Bool
-
This type groups various non-calendric layout attributes into single structure.
See moreDeclaration
Swift
public struct PartialLayoutAttributes
-
Declaration
Swift
public struct LayoutAttributes : CPCViewLayoutAttributes
-
Declaration
Swift
open var layoutAttributes: LayoutAttributes? { get }
-
Undocumented
Declaration
Swift
open var aspectRatioComponents: AspectRatio? { get }
-
Declaration
Swift
open class func aspectRatioComponents(for attributes: LayoutAttributes) -> AspectRatio?
-
Returns range of possible aspect ratio components that the month view may use for various months.
Declaration
Swift
open class func aspectRatiosComponentsRange(for partialAttributes: PartialLayoutAttributes, using calendar: Calendar) -> (lower: AspectRatio, upper: AspectRatio)
Parameters
partialAttributes
Non-calendric month view layout attributes to be used for measuring.
calendar
Calendar to use for calculations.
Return Value
Minimum and maximum aspect ratio multipliers for a month view, paired with corresponding constants.
-
Undocumented
Declaration
Swift
internal func titleFontDidUpdate()
-
Undocumented
Declaration
Swift
internal func titleMarginsDidUpdate()
-
Undocumented
Declaration
Swift
internal func titleAppearanceDidUpdate()
-
Undocumented
Declaration
Swift
internal func dayCellFontDidUpdate()
-
Undocumented
Declaration
Swift
internal func gridAppearanceDidUpdate()
-
Undocumented
Declaration
Swift
internal func gridAppearanceDidUpdate(for state: DayCellState)
-
Undocumented
Declaration
Swift
internal typealias CellIndices = GridIndices<Int>
-
Undocumented
Declaration
Swift
internal typealias CellIndex = CellIndices.Element
-
Undocumented
See moreDeclaration
Swift
internal struct Layout
-
Undocumented
Declaration
Swift
internal typealias RedrawContext = CPCMonthViewRedrawContext
-
Undocumented
Declaration
Swift
internal func clearingContext(_ rect: CGRect) -> RedrawContext?
-
Undocumented
Declaration
Swift
internal func titleRedrawContext(_ rect: CGRect) -> RedrawContext?
-
Undocumented
Declaration
Swift
internal func gridRedrawContext(_ rect: CGRect) -> RedrawContext?
-
Exposes
CPCViewTitleStyle.customTemplate
to be used from Objective C code.Declaration
Swift
@IBInspectable open dynamic var titleTemplate: String! { get set }
-
Exposes
CPCViewTitleStyle.custom
to be used from Objective C code.Declaration
Swift
@IBInspectable open dynamic var titleFormat: String! { get set }