Applies the given animation to all animatable values within the view.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
Framework
- Swift
UI
Declaration
Parameters
animation
The animation to apply to animatable values within this view.
Return Value
A view that wraps this view and applies animation
to all animatable values used within the view.
Discussion
Use this modifier on leaf views rather than container views. The animation applies to all child views within this view; calling animation(_:)
on a container view can lead to unbounded scope.