View
public extension View
-
Calls the completion handler whenever an animation on the given value completes. For this the value has to be changed within a
withAnimationblock otherwise the completion block will not be called.Declaration
Swift
func onAnimationCompleted<Value>(for value: Value, completion: @escaping (_ value: Value) -> Void) -> some View where Value : VectorArithmeticParameters
valueThe current value when the completion block is called.
completionThe completion callback to call once the animation completes.
valueThe current value when the completion block is called.
Return Value
A modified
Viewinstance with the observer attached. -
Calls the action when the given view has fully transitioned in. The action will be performed after the transition animation has finished, but will only be performed when the transition is animated.
Declaration
Swift
func onDidAppear(_ action: @escaping NavigationViewLifecycleAction) -> some ViewParameters
actionThe action to perform after the animation has finished.
Return Value
The modified view with the applied modifier.
View on GitHub
View Extension Reference