setAnimationsEnabled(_:)
Sets whether animations are enabled.
Declaration
class func setAnimationsEnabled(_ enabled: Bool)Parameters
Discussion
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.
See Also
Related Documentation
Deprecated methods
beginAnimations(_:context:)commitAnimations()setAnimationStart(_:)setAnimationDelegate(_:)setAnimationWillStart(_:)setAnimationDidStop(_:)setAnimationDuration(_:)setAnimationDelay(_:)setAnimationCurve(_:)setAnimationRepeatCount(_:)setAnimationRepeatAutoreverses(_:)setAnimationBeginsFromCurrentState(_:)setAnimationTransition(_:for:cache:)areAnimationsEnabledforBaselineLayout()