Modifiers
matchedGeometryEffect
Adds a matched geometry effect to a view.
matchedGeometryEffect(id, namespaceId)
| Parameter | Type | Description |
|---|---|---|
id | string | The id of the view. |
namespaceId | string | The namespace id of the view. Use Namespace component to create a namespace. |
Adds a matched geometry effect to a view.
Returns: ModifierConfig
See: Official SwiftUI documentation.
Works with
Works only in some places
Works only in a Namespace. Give two views the same id and change between them with an animation.
You can add it to any of these components, but it does something only in the place above.
- 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:
- matchedGeometryEffect (Modifiers) (
source-of-truth/versions/v57.0.0/sdk/ui/swift-ui/modifiers.md)