---
title: "init(viewAnimations:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nsviewanimation/init(viewanimations:)"
---

# init(viewAnimations:)

Returns an NSViewAnimation object initialized with the supplied information.

## Declaration

```swift
init(viewAnimations: [[NSViewAnimation.Key : Any]])
```

## Parameters

- `viewAnimations`: An array of doc://com.apple.documentation/documentation/Foundation/NSDictionary objects. Each dictionary specifies a view or window to animate and the effect to apply. viewAnimations can be nil, but you must later set the required array of dictionaries with doc://com.apple.appkit/documentation/AppKit/NSViewAnimation/viewAnimations if you want to use the capabilities of the NSViewAnimation class. SeeView Animation Dictionary Keys for a description of valid keys and values for dictionaries in viewAnimations.

## Return Value

Return Value The created NSViewAnimation object or nil if there was a problem initializing the object.
