AnimationGroup
public class AnimationGroup : AnimationBasic
An object that allows multiple animations to be grouped and run concurrently.
AnimationGroup()
.delay(delay)
.animations([Animation])
-
Specifies the amount of time (measured in seconds) to wait before beginning the animations.
Declaration
Swift
@discardableResult public func delay(_ delay: Float) -> Self
Parameters
delay
The amount of time (measured in seconds) to wait before beginning the animations. Specify a value of 0 to begin the animations immediately.
Return Value
Self
-
Determines the number of times the animation group will repeat.
Declaration
Swift
@discardableResult public func repeatCount(_ count: Int) -> Self
Parameters
count
The number of times the animation group will repeat.
Return Value
Self
-
Sets a Boolean value that controls whether that repeats this animation group forever.
Declaration
Swift
@discardableResult public func repeatForever(_ forever: Bool) -> Self
Parameters
forever
A Boolean value that controls whether that repeats this animation group forever.
Return Value
Self
-
Determines if the animation group plays in the reverse upon completion.
Declaration
Swift
@discardableResult public func autoReverse(_ reverse: Bool) -> Self
Parameters
reverse
true if you want to this animaiton group plays in the reverse upon completion.
Return Value
Self
-
Attach this animation group to the specific UIKit view.
Declaration
Swift
@discardableResult public override func attach(_ view: UIView) -> Self
Parameters
view
The UIKit view that attachs this animation.
Return Value
Self
-
Sets multiple animations to be grouped.
Declaration
Swift
@discardableResult public func animations(_ animations: Array<AnimationBasic>?) -> Self
Parameters
animations
The multiple animations that to be grouped.
Return Value
Self
-
Updates this animation group.
Declaration
Swift
@discardableResult public override func update(progress: Float) -> Self
Parameters
serial
A Boolean value that controls whether the animation is serial executed. Only works when there are multiple animations.
progress
The progess of the animation. 0.0~1.0
Return Value
Self
-
Starts this animation group.
Declaration
Swift
public override func start()
Parameters
serial
A Boolean value that controls whether the animation is serial executed. Only works when there are multiple animations.
-
Pauses this animation group.
Declaration
Swift
public override func pause()
-
Resumes this animation group.
Declaration
Swift
public override func resume()
-
Stops this animation group.
Declaration
Swift
public override func stop()
-
Sets the call back of start animation.
Declaration
Swift
public func startCallback(_ callback: @escaping StartCallback) -> Self
Parameters
callback
The call back of start animation.
Return Value
Self
-
Sets the call back of pause animation.
Declaration
Swift
public func pauseCallback(_ callback: @escaping PauseCallback) -> Self
Parameters
callback
The call back of pause animation.
Return Value
Self
-
Sets the call back of resume animation.
Declaration
Swift
public func resumeCallback(_ callback: @escaping ResumeCallback) -> Self
Parameters
callback
The call back of resume animation.
Return Value
Self
-
Sets the call back of repeat animation.
Declaration
Swift
public func repeatCallback(_ callback: @escaping RepeatCallback) -> Self
Parameters
callback
The call back of repeat animation.
Return Value
Self
-
Sets the call back of finish animation.
Declaration
Swift
public func finishCallback(_ callback: @escaping FinishCallback) -> Self
Parameters
callback
The call back of finish animation.
Return Value
Self
-
Builds animation group with elements.
let config: [AnimationGroupElement] = [ .view(view) .animations([Animation]) ] let animationGroup = AnimationGroup.build(config)
Declaration
Swift
public static func build(_ elements: [AnimationGroupElement]) -> AnimationGroup
Parameters
elements
The element of the animation group.
Return Value
The animation group object.