Sets the amount of time (in seconds) to wait before animating property changes within an animation block.
SDKs
- iOS 2.0+
- tvOS 9.0+
Framework
- UIKit
Declaration
class func setAnimationDelay(_ delay: TimeInterval)
Discussion
If you specify your animations using begin/commit set of methods, you use this method to specify the amount of time to wait before starting the animations. This method does nothing if called from outside of an animation block. It must be called between calls to the begin
and commit
methods. And you must call this method prior to changing the animatable properties of your views. The default value is 0
seconds.
Use of this method is discouraged in iOS 4.0 and later. Instead, you should use theanimate(with
method to specify your animations and the starting delay.