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
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)
-
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
open var adjustsFontForContentSizeCategory: Bool { get set }
-
See
selection
.Declaration
Swift
@objc(selection) open var _objcBridgedSelection: __CPCViewSelection { get set }
-
Declaration
Swift
open var selection: CPCViewSelection { get set }
-
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.
-
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 }