ContentPage

class ContentPage
extension ContentPage : Equatable, StaticIdentifiable

Undocumented

  • Returns a Boolean value indicating whether two values are equal.

    Equality is the inverse of inequality. For any values a and b, a == b implies that a != b is false.

    Declaration

    Swift

    static func == (lhs: ContentPage, rhs: ContentPage) -> Bool

    Parameters

    lhs

    A value to compare.

    rhs

    Another value to compare.

  • The last item selected to be used for accessibility purposes

    Declaration

    Swift

    var accessibilityLastSelectedElement: ContentView?
  • Allows the addition, to the end of the list, of a new ContentView in the specified section

    Declaration

    Swift

    func appendView(_ view: ContentView, in section: ContentSection)

    Parameters

    view

    the ContentView to be appended to the end of the list

  • Allows the addition, to the end of the list, of many ContentViews in the specified section

    Declaration

    Swift

    func appendViews(_ views: [ContentView], in section: ContentSection)

    Parameters

    views

    a list of ContentViews to be appended to the end of the list

  • This holds the primary state for a page and any additional button states, if needed.

    Declaration

    Swift

    var buttonStates: [ButtonStateKey : ButtonState] { get set }
  • Button state that corresponds to currentButtonStateKey

    Declaration

    Swift

    var currentButtonState: ButtonState? { get }
  • Represents a key for the currently displayed button state

    Declaration

    Swift

    var currentButtonStateKey: ButtonStateKey { get set }
  • Dig deep and find the view with the specified id. This will recursively dig through all the views.

    Declaration

    Swift

    func findView(id: StaticIdentifier, in section: ContentSection) -> ContentView?

    Parameters

    id

    The StaticIdentifier for this specific view.

    Return Value

    ContentView?

  • Defines the way desiredHeight is calculated for the footer content views. Vertically stacked will put one grid unit of height between each view and append the total desired height value. Horizontal layout is similar but will take the tallest content view’s desired height and put one grid unit of height above and below. Custom layouts will expose a closure that returns the desired height value.

    Declaration

    Swift

    var footerLayout: ContentLayout
  • Undocumented

    Declaration

    Swift

    var footerViews: [ContentView]
  • This function will search the specified portion of the Paysheet for a view with a matching StaticIdentifier. The first matching view found will be returned.

    Declaration

    Swift

    func getView(id: StaticIdentifier, in section: ContentSection) -> ContentView?

    Parameters

    id

    the StaticIdentifier matching the type of view in question

    Return Value

    nil if no view is found, otherwise the first instance of a ContentView with a matching StaticIdentifier is returned

  • This function will search the specified portion of the Paysheet for a view with a matching StaticIdentifier.

    Declaration

    Swift

    func hasView(id: StaticIdentifier, in section: ContentSection) -> Bool

    Parameters

    id

    the StaticIdentifier matching the type of view in question

    Return Value

    true if the view exists, false otherwise

  • Property for identifying order of accessibility elements in the header views Ex - This can be used to modify the VoiceOver order

    Declaration

    Swift

    var headerAccessibilityElements: [Any]? { get }
  • Defines the way desiredHeight is calculated for the header content views. Vertically stacked will put one grid unit of height between each view and append the total desired height value. Horizontal layout is similar but will take the tallest content view’s desired height and put one grid unit of height above and below. Custom layouts will exposue a closure that returns the desired height value.

    Declaration

    Swift

    var headerLayout: ContentLayout
  • Undocumented

    Declaration

    Swift

    var headerViews: [ContentView]
  • id

    Undocumented

    Declaration

    Swift

    var id: String { get }
  • id

    Each conforming object of StaticIdentifiable needs to provide a statically reachable String id that can be used to identify which class is being used.

    Declaration

    Swift

    class var id: StaticIdentifier { get }
  • This function will search the specified portion of the Paysheet for a view with a matching StaticIdentifier, and return it’s index if found.

    Declaration

    Swift

    func indexOfView(id: StaticIdentifier, in section: ContentSection) -> Int?

    Parameters

    id

    the StaticIdentifier matching the type of view in question

    Return Value

    The index of the view, otherwise nil

  • Undocumented

    Declaration

    Swift

    init()
  • Inserts a new ContentView in the specified section, at the specified index

    Declaration

    Swift

    func insertView(_ view: ContentView, in section: ContentSection, at index: Int)

    Parameters

    view

    the ContentView to insert

    at

    the index at which the new view will be inserted

  • Inserts a many ContentViews in the specified section, starting at the specified index

    Declaration

    Swift

    func insertViews(_ views: [ContentView], in section: ContentSection, at index: Int)

    Parameters

    views

    the ContentView to insert

  • The ContentViews that make up the scrollable body of the paysheet

    Declaration

    Swift

    var mainViews: [ContentView]
  • The main button state for a page. Each paysheet page can have a primary button state set to it.

    Declaration

    Swift

    var primaryButtonState: ButtonState? { get set }
  • Removes all ContentViews from the specified section

    Declaration

    Swift

    func removeAllViews(from section: ContentSection) -> [ContentView]
  • Removes the ContentView from the specified section and index

    Declaration

    Swift

    func removeView(from section: ContentSection, at index: Int) -> ContentView

    Parameters

    from

    the ContentSection from which to remove the specified view

  • Removes all ContentViews from the specified section with the given StaticIdentifier

    Note

    This will remove all views with the same viewId

    Declaration

    Swift

    func removeView(from section: ContentSection, with viewId: StaticIdentifier)
  • The static identifier reference from an instance of the type

    Declaration

    Swift

    var staticId: StaticIdentifier { get }