<!--
{
  "availability" : [
    "iOS: 10.13.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSAnimatablePropertyContainer",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSAnimatablePropertyContainer"
  },
  "title" : "NSAnimatablePropertyContainer"
}
-->

# NSAnimatablePropertyContainer

A set of methods that defines a way to add animation to an existing class with a minimum of API impact.

```
protocol NSAnimatablePropertyContainer
```

## Overview

The [`NSAnimatablePropertyContainer`](/documentation/AppKit/NSAnimatablePropertyContainer) protocol returns a proxy object for the receiver that can be used to initiate implied animation of property changes. An object’s animator proxy should be treated as if it was the object itself, and may be passed to any code that accepts the object as a parameter. Sending of key-value-coding compliant “set” messages to the proxy will trigger animation for automatically animated properties of its target object.

An object’s automatically animated properties are those for which [`NSAnimatablePropertyContainer`](/documentation/AppKit/NSAnimatablePropertyContainer) finds and returns a <doc://com.apple.documentation/documentation/QuartzCore/CAAnimation> object instead of `nil`, often because [`animator()`](/documentation/AppKit/NSAnimatablePropertyContainer/animator()) specifies a default animation for the key.

It’s perfectly valid to set a new value for a property for which an animation that is currently in progress; this simply sets a new target value for that property, with animation to the new target proceeding from whatever current value the property has reached. An in-flight property animation can be stopped by setting a new value for the property bracketed by an [`NSAnimationContext`](/documentation/AppKit/NSAnimationContext) with 0.0 as the duration.

## Topics

### Getting the Animator Proxy

[`animator()`](/documentation/AppKit/NSAnimatablePropertyContainer/animator())

Returns a proxy object for the receiver that can be used to initiate implied animation for property changes.

### Managing Animations for Properties

[`animations`](/documentation/AppKit/NSAnimatablePropertyContainer/animations)

Sets the option dictionary that maps event trigger keys to animation objects.

[`animation(forKey:)`](/documentation/AppKit/NSAnimatablePropertyContainer/animation(forKey:))

Returns the animation that should be performed for the specified key.

[`defaultAnimation(forKey:)`](/documentation/AppKit/NSAnimatablePropertyContainer/defaultAnimation(forKey:))

Returns the default animation that should be performed for the specified key.

[`NSAnimatablePropertyKey`](/documentation/AppKit/NSAnimatablePropertyKey)

### Constants

[Transition Animation Keys](/documentation/AppKit/transition-animation-keys)

The following constants define the keys that reference the transitions used as views are made visible and hidden.



---

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)