class
UI::PageControl
- UI::PageControl
- UI::View
- Reference
- Object
Overview
A horizontal row of dot indicators showing position in a paged list.
Maps to UIPageControl on iOS/iPadOS. On macOS (where no native NSPageControl exists), the AppKit renderer synthesizes an NSStackView of small circle CALayer views — one filled, others outlined.
HIG: "A page control displays a row of indicator images, each of which represents a page in a flat list." — Page controls, abstract.
HIG: "Center a page control at the bottom of the view or window." The host is responsible for positioning; this view provides the control itself.
Defined in:
ui/views/page_control.crConstructors
Instance Method Summary
-
#accept(visitor : PlatformVisitor)
Accept a platform visitor for rendering dispatch.
-
#background_style : Symbol
Background style on iOS 14+.
-
#background_style=(background_style : Symbol)
Background style on iOS 14+.
-
#current : Int32
Zero-based index of the currently selected page (filled dot).
-
#current=(current : Int32)
Zero-based index of the currently selected page (filled dot).
-
#page_indicator_tint_color : Color | Nil
Optional tint color for non-current page indicators.
-
#page_indicator_tint_color=(page_indicator_tint_color : Color | Nil)
Optional tint color for non-current page indicators.
-
#tint_color : Color | Nil
Optional tint color for the current-page indicator.
-
#tint_color=(tint_color : Color | Nil)
Optional tint color for the current-page indicator.
-
#total : Int32
Total number of pages (dots) to display.
-
#total=(total : Int32)
Total number of pages (dots) to display.
Instance methods inherited from class UI::View
accept(visitor : PlatformVisitor)
accept,
accessibility_label : String | Nil
accessibility_label,
accessibility_label=(accessibility_label : String | Nil)
accessibility_label=,
background : Color | Nil
background,
background=(background : Color | Nil)
background=,
blur_radius : Float64
blur_radius,
blur_radius=(blur_radius : Float64)
blur_radius=,
border_color : Color | Nil
border_color,
border_color=(border_color : Color | Nil)
border_color=,
border_width : Float64
border_width,
border_width=(border_width : Float64)
border_width=,
clip_to_bounds : Bool
clip_to_bounds,
clip_to_bounds=(clip_to_bounds : Bool)
clip_to_bounds=,
container_query(name : String) : self
container_query,
container_query_name : String | Nil
container_query_name,
container_query_name=(container_query_name : String | Nil)
container_query_name=,
corner_radius : Float64
corner_radius,
corner_radius=(corner_radius : Float64)
corner_radius=,
fill_screen! : self
fill_screen!,
fluid_height(min : String | Number, ideal : String | Number, max : String | Number) : selffluid_height : UI::Fluid | Nil fluid_height, fluid_height=(fluid_height : UI::Fluid | Nil) fluid_height=, fluid_width(min : String | Number, ideal : String | Number, max : String | Number) : self
fluid_width : UI::Fluid | Nil fluid_width, fluid_width=(fluid_width : UI::Fluid | Nil) fluid_width=, hidden : Bool hidden, hidden=(hidden : Bool) hidden=, id : String | Nil id, id=(id : String | Nil) id=, maximum_height : Float64 | Nil maximum_height, maximum_height=(maximum_height : Float64 | Nil) maximum_height=, maximum_width : Float64 | Nil maximum_width, maximum_width=(maximum_width : Float64 | Nil) maximum_width=, minimum_height : Float64 | Nil minimum_height, minimum_height=(minimum_height : Float64 | Nil) minimum_height=, minimum_width : Float64 | Nil minimum_width, minimum_width=(minimum_width : Float64 | Nil) minimum_width=, opacity : Float64 opacity, opacity=(opacity : Float64) opacity=, padding : EdgeInsets padding, padding=(padding : EdgeInsets) padding=, root_fill : Bool root_fill, root_fill=(root_fill : Bool) root_fill=, shadow_color : Color | Nil shadow_color, shadow_color=(shadow_color : Color | Nil) shadow_color=, shadow_offset_x : Float64 shadow_offset_x, shadow_offset_x=(shadow_offset_x : Float64) shadow_offset_x=, shadow_offset_y : Float64 shadow_offset_y, shadow_offset_y=(shadow_offset_y : Float64) shadow_offset_y=, shadow_radius : Float64 shadow_radius, shadow_radius=(shadow_radius : Float64) shadow_radius=, swiftkit_state_handle : Pointer(Void) | Nil swiftkit_state_handle, swiftkit_state_handle=(swiftkit_state_handle : Pointer(Void) | Nil) swiftkit_state_handle=, test_id : String | Nil test_id, test_id=(test_id : String | Nil) test_id=
Constructor Detail
Instance Method Detail
Accept a platform visitor for rendering dispatch.
Each concrete view type calls visitor.visit(self).
Background style on iOS 14+. :automatic — shows background only during interaction (default). :prominent — always shows background; use when this is the primary nav. :minimal — never shows background; position-only display.
Background style on iOS 14+. :automatic — shows background only during interaction (default). :prominent — always shows background; use when this is the primary nav. :minimal — never shows background; position-only display.
Optional tint color for non-current page indicators. When nil defaults to a translucent version of the tint_color / system default.
Optional tint color for non-current page indicators. When nil defaults to a translucent version of the tint_color / system default.
Optional tint color for the current-page indicator. When nil, UIPageControl defaults to UIColor.label (system-tracked). HIG: "Avoid coloring indicator images. Custom colors can reduce the contrast that differentiates the current-page indicator."
Optional tint color for the current-page indicator. When nil, UIPageControl defaults to UIColor.label (system-tracked). HIG: "Avoid coloring indicator images. Custom colors can reduce the contrast that differentiates the current-page indicator."