Transitions
Motion transitions a source view to a destination view using a linking identifier property named motionIdentifier
.
Match
Translate
Rotate
Arc
Scale
Example Usage
An example of transitioning from one view controller to another with transitions:
View Controller 1
View Controller 2
The above code snippet tells the source views in view controller 1
to link to the destination views in view controller 2
using the motionIdentifier
. Animations may be added to views during a transition using the transition method. The transition method accepts MotionTransition structs that configure the view's animation.
UINavigationController, UITabBarController, and UIViewController Transitions
Motion offers default transitions that may be used by UINavigationControllers, UITabBarControllers, and presenting UIViewControllers.
Push
Slide
ZoomSlide
Cover
Page
Fade
Zoom
Example Usage
An example of transitioning from one view controller to another using a UINavigationController with a zoom transition:
UINavigationController
To add an automatic reverse transition, use autoReverse
.
Last updated