<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSAnimation/animationBlockingMode",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSAnimation(py)animationBlockingMode"
  },
  "title" : "animationBlockingMode"
}
-->

# animationBlockingMode

The blocking mode of the animation.

```
var animationBlockingMode: NSAnimation.BlockingMode { get set }
```

## Discussion

The value in this property determines whether the animation blocks a given thread. The default value of this property is [`NSAnimation.BlockingMode.blocking`](/documentation/AppKit/NSAnimation/BlockingMode/blocking), which means that the animation runs on the main thread in a custom run-loop mode that blocks user events. When changing the value of this property, the new blocking mode takes effect the next time the animation is started and has no effect on an in-progress animation.

If you set the block mode to [`NSAnimation.BlockingMode.nonblocking`](/documentation/AppKit/NSAnimation/BlockingMode/nonblocking), the animation runs in the main thread in one of the standard run-loop modes or in a mode returned from [`NSAnimation`](/documentation/AppKit/NSAnimation). If you set the mode to [`NSAnimation.BlockingMode.nonblockingThreaded`](/documentation/AppKit/NSAnimation/BlockingMode/nonblockingThreaded), a new thread is spawned to run the animation.

---

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)