---
title: NSViewAnimation
framework: appkit
role: symbol
role_heading: Class
path: appkit/nsviewanimation
---

# NSViewAnimation

An animation of an app’s views, limited to changes in frame location and size, and to fade-in and fade-out effects.

## Declaration

```swift
class NSViewAnimation
```

## Overview

Overview An NSViewAnimation object takes an array of dictionaries from which it determines the objects to animate and the effects to apply to them. Each dictionary must have a target object and, optionally, properties that specify beginning and ending frame and whether to fade in or fade out. (See NSViewAnimation.Key for further information.) Animations with NSViewAnimation are, by default, in non-blocking mode over a duration of 0.5 seconds using the ease in-out animation curve. But you can configure the animation to have any duration, curve, frame rate, and blocking mode. You may also set progress marks, assign a delegate, and implement delegation methods in order to animate view and windows concurrent with the ones specified as targets in the view-animation dictionary. Invoking the NSAnimation stop() method on a running NSViewAnimation object moves the animation to the end frame.

## Topics

### Initializing an NSViewAnimation object

- [init(viewAnimations:)](appkit/nsviewanimation/init(viewanimations:).md)

### Getting and setting view-animation dictionaries

- [viewAnimations](appkit/nsviewanimation/viewanimations.md)
- [NSViewAnimation.Key](appkit/nsviewanimation/key.md)
- [NSViewAnimation.EffectName](appkit/nsviewanimation/effectname.md)

## Relationships

### Inherits From

- [NSAnimation](appkit/nsanimation.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### View-Based Animations

- [NSAnimatablePropertyContainer](appkit/nsanimatablepropertycontainer.md)
- [NSAnimationContext](appkit/nsanimationcontext.md)
- [NSAnimation.Progress](appkit/nsanimation/progress.md)
- [NSAnimationEffect](appkit/nsanimationeffect.md)
