Modifiers
ignoreSafeArea
Allows a view to ignore safe area constraints.
ignoreSafeArea(params)
| Parameter | Type | Description |
|---|---|---|
params(optional) | { edges: 'top' | 'bottom' | 'vertical' | 'horizontal' | 'leading' | 'trailing' | 'all', regions: 'container' | 'all' | 'keyboard' } | The safe area regions to ignore and the edges to expand into. |
Allows a view to ignore safe area constraints.
Returns: ModifierConfig
See: Official SwiftUI documentation.
Works with
This modifier works with any view. These components accept it:
- VStack
- HStack
- ZStack
- LazyVStack
- LazyHStack
- Group
- Spacer
- Divider
- Overlay
- ScrollView
- Button
- Toggle
- Checkbox
- Slider
- Picker
- DatePicker
- ColorPicker
- Link
- ControlGroup
- Menu
- ContextMenu
- TextField
- SecureField
- Text
- Label
- Image
- List
- Form
- Section
- DisclosureGroup
- SwipeActions
- BottomSheet
- Alert
- ConfirmationDialog
- Popover
- ProgressView
- Gauge
- TabView
- AccessoryWidgetBackground
Sources
The original Expo docs for this page:
- ignoreSafeArea (Modifiers) (
source-of-truth/versions/v57.0.0/sdk/ui/swift-ui/modifiers.md)
id
Attaches a stable identifier to a view so it can be referenced by scroll target bindings. Use with scrollTargetLayout() on the containing stack and the scrollPosition modifier on a scrollable container.
imageScale
Scales SF Symbols within this view relative to the surrounding text, using one of the standard sizes.