MotionTransition
Motion Identifier
Animates the view with a matching motion identifier.
Masks To Bounds
Animates the view's current masksToBounds to the given masksToBounds.
Background Color
Animates the view's current background color to the given color.
Border Color
Animates the view's current border color to the given color.
Border Width
Animates the view's current border width to the given width.
Corner Radius
Animates the view's current corner radius to the given radius.
Transform
Animates the view's current transform (perspective, scale, rotate) to the given one.
Perspective
Animates the view's current perspective to the given one through a CATransform3D object.
Rotate
Animates the view's current rotate to the given x, y, and z values.
Animates the view's current rotate to the given point.
Rotate 2d.
Scale
Animates the view's current scale to the given x, y, z scale values.
Animates the view's current x & y scale to the given scale value.
Animates the view's current translation to the given x, y, and z values.
Translate
Animates the view's current translation to the given point value (x & y), and a z value.
Position
Animates the view's current position to the given point.
Force Non Fade
Forces the view to not fade during a transition.
Fade In
Fades the view in during a transition.
Fade Out
Fades the view out during a transition.
Fade
Animates the view's current opacity to the given one.
Z Position
Animates the view's current zPosition to the given position.
Size
Animates the view's current size to the given one.
Shadow Path
Animates the view's current shadow path to the given one.
Shadow Color
Animates the view's current shadow color to the given one.
Shadow Offset
Animates the view's current shadow offset to the given one.
Shadow Opacity
Animates the view's current shadow opacity to the given one.
Shadow Radius
Animates the view's current shadow radius to the given one.
Contents Rect
Animates the view's contents rect to the given one.
Contents Scale
Animates the view's contents scale to the given one.
Duration
The duration of the view's animation.
Preferred Duration Matches Longest
Sets the view's animation duration to the longest running animation within a transition.
Delay
Delays the animation of a given view.
Timing Function
Sets the view's timing function for the transition.
Spring
Available in iOS 9+, animates a view using the spring API, given a stiffness and damping.
Arc
Animates the natural curve of a view. A value of 1 represents a curve in a downward direction, and a value of -1 represents a curve in an upward direction.
Cascade
Animates subviews with an increasing delay between each animation.
Overlay
Creates an overlay on the animating view with a given color and opacity.
Begin with
Apply transitions directly to the view at the start of the transition. The transitions supplied here won't be animated. For source views, transitions are set directly at the begining of the animation. For destination views, they replace the target state (final appearance).
Begin With If Matched
Apply transitions directly to the view at the start of the transition if the view is matched with another view. The transitions supplied here won't be animated. For source views, transitions are set directly at the begining of the animation. For destination views, they replace the target state (final appearance).
Global Coordinate Space
When using global coordinate space. The view becomes an independent view that is not a subview of any view. It won't move when its parent view moves, and won't be affected by parent view attributes. When a view is matched, this is automatically enabled. The source
transition will also enable this.
Use same parent coordinate space.
Ignore Transitions
Ignore all motion transition attributes for a view's direct subviews.
Ignore all motion transition attributes for a view's subviews.
Snapshot
This will create a snapshot optimized for different view types. For custom views or views with masking, useOptimizedSnapshot might create snapshots that appear differently than the actual view. In that case, use .useNormalSnapshot or .useSlowRenderSnapshot to disable the optimization.
This transition actually does nothing by itself since .useOptimizedSnapshot is the default.
Create a snapshot using snapshotView(afterScreenUpdates:).
Create a snapshot using layer.render(in: currentContext). This is slower than .useNormalSnapshot but gives more accurate snapshots for some views (eg. UIStackView).
Force Motion to not create any snapshots when animating this view. This will mess up the view hierarchy, therefore, view controllers have to rebuild their view structure after the transition finishes.
Force Animate
Force the view to animate (Motion will create animation contexts & snapshots for them, so that they can be interactive).
Force Scale Based Size Change
Force Motion to use scale based size animation. This will convert all .size transitions into a .scale
transition. This is to help Motion animate layers that doesn't support bounds animations. This also gives better performance.
Last updated