CPCCalendarView
open class CPCCalendarView : UIView
A container view that internally manages and reuses CPCMonthView
instances to provide
an illusion of infinitely scrollable calendar interface.
Implementation details are private and you are strongly discouraged from relying on
any internal hierarchy of the container. Instead, use CPCMultiMonthView
that provides
the same unified selection handling and appearance attributes management, but assigning
month values to specific views or arranging them visually remains under user control.
-
Defines the boundary for ccalendar view content.
See moreDeclaration
Swift
@objc(CPCCalendarViewColumnContentInsetReference) public enum ColumnContentInsetReference : Int
-
Calendar to be used for various locale-dependent info.
Declaration
Swift
open var calendar: Calendar { get set }
-
Undocumented
Declaration
Swift
open override var backgroundColor: UIColor? { get set }
-
Undocumented
Declaration
Swift
open var adjustsFontForContentSizeCategory: Bool { get set }
-
The minimum date that a calendar view should present to user. Defaults to
nil
meaning no lower limit.Declaration
Swift
open var minimumDate: Date? { get set }
-
The maximum date that a calendar view should present to user. Defaults to
nil
meaning no upper limit.Declaration
Swift
open var maximumDate: Date? { get set }
-
The number of columns to display in a calendar view.
Declaration
Swift
@IBInspectable open dynamic var columnCount: Int { get set }
-
Insets or outsets that are applied to each calendar column.
Declaration
Swift
@IBInspectable open dynamic var columnContentInset: UIEdgeInsets { get set }
-
Defines the boundary used for layout calculations.
Note
calendar view’s behaviour when using this value is analagous to that exhibited byUICollectionViewFlowLayout.sectionInsetReference
, meaning contentInset are always respected.Declaration
Swift
@IBInspectable open dynamic var columnContentInsetReference: ColumnContentInsetReference { get set }
-
Undocumented
Declaration
Swift
internal unowned let collectionView: UICollectionView
-
Undocumented
Declaration
Swift
internal var calendarViewController: CPCCalendarViewController? { get set }
-
Undocumented
Declaration
Swift
internal var monthViewsManager: CPCMonthViewsManager { get }
-
Undocumented
Declaration
Swift
public override init(frame: CGRect)
-
Undocumented
Declaration
Swift
public required init?(coder aDecoder: NSCoder)
-
Undocumented
Declaration
Swift
deinit
-
Undocumented
Declaration
Swift
open override func layoutSubviews()
-
Undocumented
Declaration
Swift
open override func layoutMarginsDidChange()
-
Undocumented
Declaration
Swift
open override func safeAreaInsetsDidChange()
-
Undocumented
Declaration
Swift
open override func willMove(toWindow newWindow: UIWindow?)
-
Undocumented
Declaration
Swift
open override func didMoveToWindow()
-
Undocumented
Declaration
Swift
open override func didAddSubview(_ subview: UIView)
-
Undocumented
Declaration
Swift
open override func willRemoveSubview(_ subview: UIView)
-
Undocumented
Declaration
Swift
internal var layout: Layout { get }
-
Undocumented
Declaration
Swift
internal func invalidateLayout()
-
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 }
-
Declaration
Swift
open var cellRenderer: CellRenderer { get set }
-
Declaration
Swift
@objc(dayCellTextColorForState:) open dynamic func dayCellTextColor(for state: DayCellState) -> UIColor?
-
Declaration
Swift
@objc(setDayCellTextColor:forState:) open dynamic func setDayCellTextColor(_ textColor: 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)
-
See
selection
.Declaration
Swift
@objc(selection) open var _objcBridgedSelection: __CPCViewSelection { get set }
-
Declaration
Swift
open var selection: CPCViewSelection { get set }
-
The object that acts as the selection delegate of this view.
Declaration
Swift
open var selectionDelegate: CPCCalendarViewSelectionDelegate? { get set }
-
Tells the view that selected days were changed in response to user actions.
Default implementation does nothing. Subclasses can override it to perform additional actions whenever selection changes.
Declaration
Swift
@objc open func selectionDidChange()
-
Undocumented
Declaration
Swift
internal func selectionValue(of delegate: CPCCalendarViewSelectionDelegate) -> Selection
-
Undocumented
Declaration
Swift
internal func setSelectionValue(_ selection: Selection, in delegate: CPCCalendarViewSelectionDelegate)
-
Undocumented
Declaration
Swift
internal func resetSelection(in delegate: CPCCalendarViewSelectionDelegate)
-
Undocumented
Declaration
Swift
internal func handlerShouldSelectDayCell(_ day: CPCDay, delegate: CPCCalendarViewSelectionDelegate) -> Bool
-
Undocumented
Declaration
Swift
internal func handlerShouldDeselectDayCell(_ day: CPCDay, delegate: CPCCalendarViewSelectionDelegate) -> Bool
-
Undocumented
Declaration
Swift
internal func updateManagedMonthViews(using block: (CPCMonthView) -> ())
-
A Boolean value that controls whether the scroll view bounces past the edge of content and back again.
Declaration
Swift
open var bounces: Bool { get set }
-
A Boolean value that determines whether bouncing always occurs when vertical scrolling reaches the end of the content.
Declaration
Swift
open var alwaysBounceVertical: Bool { get set }
-
A Boolean value that determines whether bouncing always occurs when horizontal scrolling reaches the end of the content view.
Declaration
Swift
open var alwaysBounceHorizontal: Bool { get set }
-
A Boolean value that controls whether the scroll-to-today gesture is enabled.
Declaration
Swift
open var scrollsToToday: Bool { get set }
-
The custom distance that the content view is inset from the safe area or scroll view edges.
Declaration
Swift
open var contentInset: UIEdgeInsets { get set }
-
The distance the scroll indicators are inset from the edge of the scroll view.
Declaration
Swift
open var scrollIndicatorInsets: UIEdgeInsets { get set }
-
The insets derived from the content insets and the safe area of the scroll view.
Declaration
Swift
@available(iOS 11.0, *) open var adjustedContentInset: UIEdgeInsets { get }
-
The behavior for determining the adjusted content offsets.
Declaration
Swift
@available(iOS 11.0, *) open var contentInsetAdjustmentBehavior: UIScrollView.ContentInsetAdjustmentBehavior { get set }
-
A Boolean value that controls whether the horizontal scroll indicator is visible.
Declaration
Swift
open var showsHorizontalScrollIndicator: Bool { get set }
-
A Boolean value that controls whether the vertical scroll indicator is visible.
Declaration
Swift
open var showsVerticalScrollIndicator: Bool { get set }
-
Scrolls a specific area of the content so that it is visible in the receiver.
Declaration
Swift
open func scrollTo(date: Date, animated: Bool)
Parameters
date
A date that must be visible after scroll animation finishes.
animated
true
if the scrolling should be animated,false
if it should be immediate. -
Scrolls a specific area of the content so that it is visible in the receiver.
Declaration
Swift
open func scrollTo(day: CPCDay, animated: Bool)
Parameters
day
A specific day that must be visible after scroll animation finishes.
animated
true
if the scrolling should be animated,false
if it should be immediate. -
Scrolls a specific area of the content so that it is visible in the receiver.
Declaration
Swift
open func scrollTo(month: CPCMonth, animated: Bool)
Parameters
month
A specific month that must be visible after scroll animation finishes.
animated
true
if the scrolling should be animated,false
if it should be immediate.
-
Undocumented
See moreDeclaration
Swift
internal final class DataSource : NSObject
-
Undocumented
See moreDeclaration
Swift
internal final class Layout : UICollectionViewLayout
-
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 }