CPCMultiMonthsView

open class CPCMultiMonthsView : UIView, CPCViewProtocol

A container view that provides an aggregate interface for managed month views.

After a month view has been added to the container, its appearance properties must no longer can be individually; their values are managed by the container view and are exactly same for all children. Selection and user interaction is also managed by the container, which provides aggregate selection value, enabled region and supports selection that spans across multiple views. On the other hand, layout of the managed subviews is not performed and remains user responsibility.

  • The list of views arranged by the container view.

    Declaration

    Swift

    @objc
    open var monthViews: [CPCMonthView] { get }
  • Adds a managed month view to the end of monthViews array.

    Note

    This method also adds the given view as subview to the container.

    Declaration

    Swift

    @objc
    open func addMonthView(_ monthView: CPCMonthView)

    Parameters

    monthView

    The month view to be added.

  • Adds the provided view to the monthViews array at the specified index.

    Note

    This method also adds the given view as subview to the container.

    Declaration

    Swift

    @objc
    open func insertMonthView(_ monthView: CPCMonthView, at index: Int)

    Parameters

    monthView

    The month view to be added.

    index

    Index for the aded view.

  • Removes the provided view from monthViews and stops it properties management.

    Note

    This method does not remove month view from the container’s subviews.

    Declaration

    Swift

    @objc
    open func removeMonthView(_ monthView: CPCMonthView)

    Parameters

    monthView

    Month view to remove.

  • 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 }