class
UI::Sheet
Overview
Sheet — Modal sheet that slides up from the bottom (iOS) or appears as a dialog (macOS).
Defined in:
ui/views/sheet.crConstructors
Instance Method Summary
-
#accept(visitor : PlatformVisitor)
Accept a platform visitor for rendering dispatch.
- #content : View | Nil
- #content=(content : View | Nil)
- #detents : Array(Symbol)
- #detents=(detents : Array(Symbol))
- #is_presented : Bool
-
#is_presented=(new_value : Bool) : Bool
Phase 3 Remediation 10 — reactive setter.
-
#material_semantic : Symbol | Nil
Phase 5 v2 — Apple semantic material override for the sheet's presented background.
-
#material_semantic=(material_semantic : Symbol | Nil)
Phase 5 v2 — Apple semantic material override for the sheet's presented background.
- #on_dismiss : Proc(Nil) | Nil
- #on_dismiss=(on_dismiss : Proc(Nil) | Nil)
- #selected_detent : Symbol
- #selected_detent=(selected_detent : Symbol)
- #shows_drag_indicator : Bool
- #shows_drag_indicator=(shows_drag_indicator : Bool)
-
#surface_style : Symbol
HIG surface-chrome style.
-
#surface_style=(surface_style : Symbol)
HIG surface-chrome style.
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).
Phase 3 Remediation 10 — reactive setter. Mirrors the
UI::Toggle#is_on= pattern: setting #is_presented after the
renderer has emitted the SwiftKit hosting view dispatches
through apsk_sheet_set_presented, which flips the
APSKSheetState.isPresented @Published field and triggers a
SwiftUI re-render that presents / dismisses the sheet via
.sheet(isPresented:). Setters issued before the view has been
rendered are simply stored on the property; the next render
seeds the reactive state from the new value.
Phase 5 v2 — Apple semantic material override for the sheet's presented background. nil = HIG-canonical :sheet (NSVisualEffectMaterialSheet on macOS; .thickMaterial via .presentationBackground on iOS 16.4+).
Phase 5 v2 — Apple semantic material override for the sheet's presented background. nil = HIG-canonical :sheet (NSVisualEffectMaterialSheet on macOS; .thickMaterial via .presentationBackground on iOS 16.4+).
HIG surface-chrome style. Controls how renderers paint the sheet's container when rendering inline (i.e., when is_presented is false or the visitor is drawing the content directly into the host view). :auto — render with HIG grouped-card chrome by default (rounded corners, grouped-background fill, 16pt padding). This is the default so inline sheet content reads like a real HIG presentation surface. :grouped_card — explicit grouped-card chrome. :plain — no chrome; act as a bare container.
HIG surface-chrome style. Controls how renderers paint the sheet's container when rendering inline (i.e., when is_presented is false or the visitor is drawing the content directly into the host view). :auto — render with HIG grouped-card chrome by default (rounded corners, grouped-background fill, 16pt padding). This is the default so inline sheet content reads like a real HIG presentation surface. :grouped_card — explicit grouped-card chrome. :plain — no chrome; act as a bare container.