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
aandb,a == bimplies thata != bisfalse.Declaration
Swift
static func == (lhs: ContentPage, rhs: ContentPage) -> BoolParameters
lhsA value to compare.
rhsAnother 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
ContentViewin the specified sectionDeclaration
Swift
func appendView(_ view: ContentView, in section: ContentSection)Parameters
viewthe
ContentViewto be appended to the end of the list -
Allows the addition, to the end of the list, of many
ContentViews in the specified sectionDeclaration
Swift
func appendViews(_ views: [ContentView], in section: ContentSection)Parameters
viewsa 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
currentButtonStateKeyDeclaration
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
idThe
StaticIdentifierfor 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
idthe
StaticIdentifiermatching the type of view in questionReturn Value
nilif no view is found, otherwise the first instance of aContentViewwith a matchingStaticIdentifieris 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) -> BoolParameters
idthe
StaticIdentifiermatching the type of view in questionReturn 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] -
Undocumented
Declaration
Swift
var id: String { get } -
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
idthe
StaticIdentifiermatching the type of view in questionReturn Value
The index of the view, otherwise nil
-
Undocumented
Declaration
Swift
init() -
Inserts a new
ContentViewin the specified section, at the specified indexDeclaration
Swift
func insertView(_ view: ContentView, in section: ContentSection, at index: Int)Parameters
viewthe
ContentViewto insertatthe index at which the new view will be inserted
-
Inserts a many
ContentViews in the specified section, starting at the specified indexDeclaration
Swift
func insertViews(_ views: [ContentView], in section: ContentSection, at index: Int)Parameters
viewsthe
ContentViewto 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 sectionDeclaration
Swift
func removeAllViews(from section: ContentSection) -> [ContentView] -
Removes the
ContentViewfrom the specified section and indexDeclaration
Swift
func removeView(from section: ContentSection, at index: Int) -> ContentViewParameters
fromthe
ContentSectionfrom which to remove the specified view -
Removes all
ContentViews from the specified section with the givenStaticIdentifierNote
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 }
View on GitHub
Install in Dash
ContentPage Class Reference