Animation
public struct Animation
extension Animation: Hashable
A type that describes properties of an animation
-
Declaration
Swift
public static func == (lhs: Animation, rhs: Animation) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
A spring animation.
Declaration
Swift
public static func spring(response: Double = 0.55, dampingFraction: Double = 0.825) -> Animation
Parameters
response
The stiffness of the spring, defined as an approximate duration in seconds. A value of zero requests an infinitely-stiff spring, suitable for driving interactive animations.
dampingFraction
The amount of drag applied to the value being animated. Use a value of 1 for no bouncing.
Return Value
a spring animation.
-
A convenience for a
spring()
animation with a lowerresponse
value, intended for driving interactive animations.Declaration
Swift
public static func interactiveSpring(response: Double = 0.15, dampingFraction: Double = 0.86) -> Animation
-
The default animation of the system.
Declaration
Swift
public static let `default`: Animation
-
Returns an Ease in out animation with the specified duration.
Declaration
Swift
public static func easeInOut(duration: Double) -> Animation
-
Returns an Ease in out animation.
Declaration
Swift
public static var easeInOut: Animation { get }
-
Returns an Ease in animation with the specified duration.
Declaration
Swift
public static func easeIn(duration: Double) -> Animation
-
Returns an Ease in animation.
Declaration
Swift
public static var easeIn: Animation { get }
-
Returns an Ease out animation with the specified duration.
Declaration
Swift
public static func easeOut(duration: Double) -> Animation
-
Returns an Ease out animation.
Declaration
Swift
public static var easeOut: Animation { get }
-
Returns a linear animation with the specified duration.
Declaration
Swift
public static func linear(duration: Double) -> Animation
-
Returns a linear animation.
Declaration
Swift
public static var linear: Animation { get }
-
Returns a modified version of the animation with the specified delay.
Declaration
Swift
public func delay(_ delay: Double) -> Animation
-
Returns a modified version of the animation with the specified repeat count.
Declaration
Swift
public func repeatCount(_ repeatCount: Int, autoreverses: Bool = true) -> Animation
-
Returns a modified version of the animation with the specified value of
repeatForever
.Declaration
Swift
public func repeatForever(autoreverses: Bool = true) -> Animation