One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

AnimationLibraryComponent.AnimationCollection

struct · iOS 18.0+ · SDK 27.1

struct AnimationCollection

A collection of animations an entity can play. You use `AnimationCollection` to access animations in an ``AnimationLibraryComponent``. The initializers for ``AnimationLibraryComponent`` create an `AnimationCollection`, so you don't need to create one directly. You can access the collection with the ``AnimationLibraryComponent/animations`` property.

Members (10)

get · iOS 18.0+

startIndex

TypeScript
get startIndex(): AnimationLibraryComponent_AnimationCollection_Index
Swift declaration
var startIndex: AnimationLibraryComponent.AnimationCollection.Index { get }

An index to the first animation in the collection.

method · iOS 18.0+

makeIterator

TypeScript
makeIterator(): AnimationLibraryComponent_AnimationCollection_Iterator
Swift declaration
func makeIterator() -> AnimationLibraryComponent.AnimationCollection.Iterator

Returns an iterator over the animations in the collection.

get · iOS 18.0+

count

TypeScript
get count(): number
Swift declaration
var count: Int { get }

The number of animations in the collection.

method · iOS 18.0+

index

TypeScript
index(i: AnimationLibraryComponent_AnimationCollection_Index): AnimationLibraryComponent_AnimationCollection_Index
Swift declaration
func index(after i: AnimationLibraryComponent.AnimationCollection.Index) -> AnimationLibraryComponent.AnimationCollection.Index

Returns the position in the collection that follows an index. - Parameter i: A valid index of the collection. `i` must be less than `endIndex`.

get · iOS 18.0+

isEmpty

TypeScript
get isEmpty(): boolean
Swift declaration
var isEmpty: Bool { get }

A Boolean value that indicates whether the collection is empty.

get · iOS 18.0+

endIndex

TypeScript
get endIndex(): AnimationLibraryComponent_AnimationCollection_Index
Swift declaration
var endIndex: AnimationLibraryComponent.AnimationCollection.Index { get }

An index to the last animation in the collection.

method · iOS 18.0+

formIndex

TypeScript
formIndex(i: AnimationLibraryComponent_AnimationCollection_Index): { $ret: null; $out: { "i": AnimationLibraryComponent_AnimationCollection_Index } }
Swift declaration
func formIndex(after i: inout AnimationLibraryComponent.AnimationCollection.Index)

Replaces the index with its successor.

Omit the output parameters from the call. The result contains $ret and $out, with i inside $out.

subscript · iOS 18.0+

subscript

TypeScript
subscript(key: string): (AnimationResource) | null
Swift declaration
subscript(key: String) -> AnimationResource? { get set }

Accesses a single animation in the collection with a key. - Parameter key: A name for the animation to look up. - Returns: An animation resource, or `nil` if the component can't find one that maps to the `key`.

subscript · iOS 18.0+

subscript

TypeScript
subscript22305(position: AnimationLibraryComponent_AnimationCollection_Index): { "key": string; "value": AnimationResource }
Swift declaration
subscript(position: AnimationLibraryComponent.AnimationCollection.Index) -> AnimationLibraryComponent.AnimationCollection.Element { get }

Accesses a single animation in the collection at an index. - Parameter position: An index into the collection's dictionary. - Returns: The animation at the dictionary index.

subscript · iOS 18.0+

subscript

TypeScript
subscript94245(bounds: SDKHandle): SDKHandle
Swift declaration
subscript(bounds: Range<AnimationLibraryComponent.AnimationCollection.Index>) -> AnimationLibraryComponent.AnimationCollection.SubSequence { get }

Accesses animations in the collection within an index range. - Parameter bounds: A range of indices to look up. - Returns: A subsequence of animation resources in the range of `bounds`.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

AnimationLibraryComponent.AnimationCollection.init(dictionaryLiteral:)

A variable number of Swift arguments is not supported.

All RealityFoundation types →