<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSViewAnimation/init(viewAnimations:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSViewAnimation(im)initWithViewAnimations:"
  },
  "title" : "init(viewAnimations:)"
}
-->

# init(viewAnimations:)

Returns an `NSViewAnimation` object initialized with the supplied information.

```
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 [`viewAnimations`](/documentation/AppKit/NSViewAnimation/viewAnimations) if you want to use the capabilities of the `NSViewAnimation` class. See`View Animation Dictionary Keys` for a description of valid keys and values for dictionaries in `viewAnimations`.

## Return Value

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

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)