bindTarget
TypeScriptget bindTarget(): BindTargetSwift declarationvar bindTarget: BindTarget { get set }A textual name that refers to a property on which to run the grouped animations.
struct · iOS 15.0+ · SDK 27.1
struct AnimationGroupA collection of animations that play simultaneously. This structure concurrently starts the animations it contains. Use a group to: - Animate more than one property at once. - Animate the same property at different times. ### Animate multiple properties concurrently For each animatable property your animation needs to control, create a group and add an animation to the array argument of the initializer. The following listing begins coding an animation group that colorizes 3D numbers that count down over a 4-second duration. ```swift let frames: [Float] = [3.0, 2.0, 1.0, 0.0] let duration = TimeInterval(frames.count) let anim1 = FromToByAnimation<Float>(name: "colorize", from: 0.0, to: 1.0, duration: duration, bindTarget: .parameter("foo")) let anim2 = SampledAnimation<Float>(frames: frames, name: "count down", frameInterval: duration / frames.count, bindTarget: .parameter("bar")) let group = AnimationGroup(group: [anim1, anim2], name: "group") ``` ### Create a sequence for the same animation You can play the same animation at different times by grouping multiple ``AnimationDefinition`` objects that refer to the same animated property. To disperse their playback at runtime, give each definition a unique ``AnimationDefinition/delay``. - Important: The framework processes animations with a lower ``AnimationGroup/blendLayer`` first, and if the ``AnimationGroup/blendLayer`` matches, in the order in which they appear in the groups array. If two animations on the same property overlap durations at runtime, the one that the framework processes second overwrites the first.
get bindTarget(): BindTargetSwift declarationvar bindTarget: BindTarget { get set }A textual name that refers to a property on which to run the grouped animations.
set bindTarget(value: BindTarget)Swift declarationvar bindTarget: BindTarget { get set }A textual name that refers to a property on which to run the grouped animations.
get blendLayer(): numberSwift declarationvar blendLayer: Int32 { get set }The order in which the framework composites the animation. The framework applies multiple animations on the same target in ascending order of this property’s value. Animations in a lower layer run before animations in a higher layer. Animations that share the same value apply in the order they execute.
set blendLayer(value: number)Swift declarationvar blendLayer: Int32 { get set }The order in which the framework composites the animation. The framework applies multiple animations on the same target in ascending order of this property’s value. Animations in a lower layer run before animations in a higher layer. Animations that share the same value apply in the order they execute.
get repeatMode(): AnimationRepeatModeSwift declarationvar repeatMode: AnimationRepeatMode { get set }An option that determines how the animations repeat. If you call ``FromToByAnimation/trimmed(start:end:duration:)`` with a `start` or `end` that lies outside of the timeline defined by ``AnimationGroup/duration``, the animation fills the additional playback by applying this property.
set repeatMode(value: AnimationRepeatMode)Swift declarationvar repeatMode: AnimationRepeatMode { get set }An option that determines how the animations repeat. If you call ``FromToByAnimation/trimmed(start:end:duration:)`` with a `start` or `end` that lies outside of the timeline defined by ``AnimationGroup/duration``, the animation fills the additional playback by applying this property.
get trimDuration(): (number) | nullSwift declarationvar trimDuration: TimeInterval? { get set }An optional duration that overrides the calculated duration. The framework calculates ``FromToByAnimation/duration``, but you can set this property to override it. This property is `nil` by default, which indicates that the animation stops after one play that spans ``AnimationGroup/duration``. If you set a non-zero value for this property and both ``AnimationGroup/trimStart`` and ``AnimationGroup/trimEnd`` are `nil`, the animation observes this property as an edited duration. When you set ``AnimationGroup/repeatMode`` to make the animation repeat: - If this property is `nil`, the animation repeats forever. - If set to a value greater than ``AnimationGroup/duration``, the animation repeats for the specified duration.
set trimDuration(value: (number) | null)Swift declarationvar trimDuration: TimeInterval? { get set }An optional duration that overrides the calculated duration. The framework calculates ``FromToByAnimation/duration``, but you can set this property to override it. This property is `nil` by default, which indicates that the animation stops after one play that spans ``AnimationGroup/duration``. If you set a non-zero value for this property and both ``AnimationGroup/trimStart`` and ``AnimationGroup/trimEnd`` are `nil`, the animation observes this property as an edited duration. When you set ``AnimationGroup/repeatMode`` to make the animation repeat: - If this property is `nil`, the animation repeats forever. - If set to a value greater than ``AnimationGroup/duration``, the animation repeats for the specified duration.
get name(): stringSwift declarationvar name: String { get set }A textual name for the group.
set name(value: string)Swift declarationvar name: String { get set }A textual name for the group.
get delay(): numberSwift declarationvar delay: TimeInterval { get set }An amount of time that lapses before the animation plays. The default value is `0`, which indicates that the animation plays with no delay. If you set a value for this property, the animation plays from its start time after the specified delay lapses. During the delayed time, the animation doesn't update. However, to fill the delayed time with some portion of animation, set a negative ``AnimationGroup/trimStart`` instead and choose a ``OrbitAnimation/fillMode`` that displays the desired portion of animation.
set delay(value: number)Swift declarationvar delay: TimeInterval { get set }An amount of time that lapses before the animation plays. The default value is `0`, which indicates that the animation plays with no delay. If you set a value for this property, the animation plays from its start time after the specified delay lapses. During the delayed time, the animation doesn't update. However, to fill the delayed time with some portion of animation, set a negative ``AnimationGroup/trimStart`` instead and choose a ``OrbitAnimation/fillMode`` that displays the desired portion of animation.
static init(group: Array<SDKHandle>, name?: string, repeatMode?: AnimationRepeatMode, fillMode?: AnimationFillMode, trimStart?: (number) | null, trimEnd?: (number) | null, trimDuration?: (number) | null, offset?: number, delay?: number, speed?: number): AnimationGroupSwift declarationinit(group: [any AnimationDefinition], name: String = "", repeatMode: AnimationRepeatMode = .none, fillMode: AnimationFillMode = [], trimStart: TimeInterval? = nil, trimEnd: TimeInterval? = nil, trimDuration: TimeInterval? = nil, offset: TimeInterval = 0, delay: TimeInterval = 0, speed: Float = 1.0)Creates a collection of animations that play simultaneously. - Parameters: - group: A collection of animations to run. - name: A textual name for the group. - repeatMode: An option that determines how the animations repeat. - fillMode: The playback behavior outside of the normal duration. - trimStart: The time, in seconds, at which the animations play. - trimEnd: The time, in seconds, at which the animations stop. - trimDuration: An optional duration that overrides the calculated duration. - offset: The time, in seconds, at which the animation begins within the duration. - delay: An amount of time that lapses before the animation plays. - speed: A factor that increases or decreases the animation’s rate of playback.
get group(): Array<SDKHandle>Swift declarationvar group: [any AnimationDefinition] { get set }A collection of animations to run.
set group(value: Array<SDKHandle>)Swift declarationvar group: [any AnimationDefinition] { get set }A collection of animations to run.
get speed(): numberSwift declarationvar speed: Float { get set }A factor that increases or decreases the animation's rate of playback. The default value is `1.0`, which doesn’t alter the animation’s duration. A value of `2.0` indicates that the duration is half the normal rate. A value of `0.5` indicates that the duration is twice the normal rate. Negative values play the animation in reverse. This property doesn’t affect the animation’s ``FromToByAnimation/delay``.
set speed(value: number)Swift declarationvar speed: Float { get set }A factor that increases or decreases the animation's rate of playback. The default value is `1.0`, which doesn’t alter the animation’s duration. A value of `2.0` indicates that the duration is half the normal rate. A value of `0.5` indicates that the duration is twice the normal rate. Negative values play the animation in reverse. This property doesn’t affect the animation’s ``FromToByAnimation/delay``.
get offset(): numberSwift declarationvar offset: TimeInterval { get set }The time, in seconds, at which the animations begin within the duration. The default value is `0`, which indicates that the animation plays with no offset. Setting a value for this property moves the animation data along the timeline and doesn't change timing. If you set a ``AnimationGroup/fillMode`` other than ``AnimationFillMode/none``, the animation fills the vacant area created by the offset according to the characteristics of the specified fill mode.
set offset(value: number)Swift declarationvar offset: TimeInterval { get set }The time, in seconds, at which the animations begin within the duration. The default value is `0`, which indicates that the animation plays with no offset. Setting a value for this property moves the animation data along the timeline and doesn't change timing. If you set a ``AnimationGroup/fillMode`` other than ``AnimationFillMode/none``, the animation fills the vacant area created by the offset according to the characteristics of the specified fill mode.
get trimEnd(): (number) | nullSwift declarationvar trimEnd: TimeInterval? { get set }The time, in seconds, at which the animations stop. This property is `nil` by default, which plays the animation until `time` = ``AnimationGroup/duration``. If you set a value, the animation edits the duration according to the specified ending time.
set trimEnd(value: (number) | null)Swift declarationvar trimEnd: TimeInterval? { get set }The time, in seconds, at which the animations stop. This property is `nil` by default, which plays the animation until `time` = ``AnimationGroup/duration``. If you set a value, the animation edits the duration according to the specified ending time.
get additive(): booleanSwift declarationvar additive: Bool { get set }A Boolean value that indicates whether the animation builds on the current state of the target entity or resets the state before running.
set additive(value: boolean)Swift declarationvar additive: Bool { get set }A Boolean value that indicates whether the animation builds on the current state of the target entity or resets the state before running.
get duration(): numberSwift declarationvar duration: TimeInterval { get }The total playback time of the animation. The framework sets a value for this property depending on the underlying animation data and the specified ``AnimationGroup/speed``. You can override the default duration by defining ``AnimationGroup/trimStart``, ``AnimationGroup/trimEnd``, or ``AnimationGroup/trimDuration``.
get fillMode(): AnimationFillModeSwift declarationvar fillMode: AnimationFillMode { get set }An option that determines which data displays outside of the normal duration. This property determines what to display when the framework samples the animation outside of the range defined by its underlying duration. The animation applies this property when: - Playback progresses toward, but hasn't yet reached, a nonzero ``AnimationDefinition/offset``. - A range determined by ``AnimationDefinition/trimStart``, ``AnimationDefinition/trimEnd``, or ``AnimationDefinition/trimDuration`` exceeds the animation's underlying duration.
set fillMode(value: AnimationFillMode)Swift declarationvar fillMode: AnimationFillMode { get set }An option that determines which data displays outside of the normal duration. This property determines what to display when the framework samples the animation outside of the range defined by its underlying duration. The animation applies this property when: - Playback progresses toward, but hasn't yet reached, a nonzero ``AnimationDefinition/offset``. - A range determined by ``AnimationDefinition/trimStart``, ``AnimationDefinition/trimEnd``, or ``AnimationDefinition/trimDuration`` exceeds the animation's underlying duration.
get trimStart(): (number) | nullSwift declarationvar trimStart: TimeInterval? { get set }The time, in seconds, at which the animations play. This property is `nil` by default, which plays the animation with `time` = `0`. If you set a value, the animation edits the duration according to the specified beginning time. If you set a negative value for this property, the duration increases and the additional animation data fills in based on the ``AnimationView/fillMode`` you choose.
set trimStart(value: (number) | null)Swift declarationvar trimStart: TimeInterval? { get set }The time, in seconds, at which the animations play. This property is `nil` by default, which plays the animation with `time` = `0`. If you set a value, the animation edits the duration according to the specified beginning time. If you set a negative value for this property, the duration increases and the additional animation data fills in based on the ``AnimationView/fillMode`` you choose.
No declarations were skipped in this snapshot.