Sets whether animations are enabled.
- iOS 2.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
YESto enable animations or
NOto disable them.
Animations are enabled by default. If you disable animations, code inside subsequent animation blocks is still executed but no animations actually occur. Thus, any changes you make inside an animation block are reflected immediately instead of being animated. This is true whether you use the block-based animation methods or the begin/commit animation methods.
This method affects only those animations that are submitted after it is called. If you call this method while existing animations are running, those animations continue running until they reach their natural end point.