MixedAnimation
public class MixedAnimation : AnimationType
Concatenate different affine transformations in one single transformation.
-
Initializer for the MixedAnimation object.
Declaration
Swift
init(view: UIView, duration: TimeInterval)Parameters
durationthe length of the animation, expressed in Seconds.
viewthe view of the object.
-
Adds an Identity transformation to the object’s transformations list.
Declaration
Swift
public func transformIdentity() -> MixedAnimation -
Moves the view by a specified amount, both horizontally and vertically.
Declaration
Swift
public func transform(translationX: CGFloat, translationY: CGFloat) -> MixedAnimationParameters
translationXhow much the view should move horizontally.
translationYhow much the view should move vertically.
-
Rotates the view by a specified amount.
Declaration
Swift
public func transform(rotationAngle: CGFloat) -> MixedAnimationParameters
rotationAnglehow much the view should rotate, in degrees.
-
Changes the view’s width and height values by the specified horizontal and vertical scale values.
Declaration
Swift
public func transform(scaleX: CGFloat, scaleY: CGFloat) -> MixedAnimationParameters
scaleXthe new horizontal scale value to be applied to the view.
scaleYthe new vertical scale value to be applied to the view.
-
Moves the position of the view by changing the center point of the view.
Declaration
Swift
public func action(positionX: CGFloat, positionY: CGFloat) -> MixedAnimationParameters
positionXthe new horizontal position of the view, from the center.
positionYthe new vertical position of the view, from the center.
-
Moves the position of the view a specified amount, from the center of the view.
Declaration
Swift
public func action(translateX: CGFloat, translateY: CGFloat) -> MixedAnimationParameters
translateXhow much the view should move horizontally, from the center.
translateYhow much the view should move vertically, from the center.
-
Multiplies the object view’s frame width and height values by the specified horizontal and vertical scale values.
Declaration
Swift
public func action(scaleX: CGFloat, scaleY: CGFloat) -> MixedAnimationParameters
scaleXthe new horizontal scale value to be applied to the object’s view.
scaleYthe new vertical scale value to be applied to the object’s view.
-
Applies an alpha value to the object’s view.
Declaration
Swift
public func action(alpha: CGFloat) -> MixedAnimationParameters
alphathe alpha value to be applied to the object’s view.
-
Moves the view to the front or back of the superview.
Declaration
Swift
public func action(moveTo position: UIView.Position) -> MixedAnimationParameters
moveTothe position the view should be moved to, in relation to it’s superview. See
UIView.Positionfor more details. -
Starts the first animation on the object’s animation list.
Declaration
Swift
public func startAnimation(completion: ((Bool) -> Void)? = .none)Parameters
completioncompletion handler for when the animation has finished.
MixedAnimation Class Reference