Contents

setAnimationBeginsFromCurrentState(_:)

Sets whether the animation should begin playing from the current state.

Declaration

class func setAnimationBeginsFromCurrentState(_ fromCurrentState: Bool)

Parameters

  • fromCurrentState:

    Specify True if animations should begin from their currently visible state; otherwise, False.

Discussion

If set to true when an animation is in flight, the current view position of the in-flight animation is used as the starting state for the new animation. If set to false, the in-flight animation ends before the new animation begins using the last view position as the starting state. This method does nothing if an animation is not in flight or invoked outside of an animation block. Use the beginAnimations(_:context:) class method to start and the commitAnimations() class method to end an animation block. The default value is false.

Use of this method is discouraged in iOS 4.0 and later. Instead, you should use theanimate(withDuration:delay:options:animations:completion:) method to specify your animations and the animation options.

See Also

Deprecated methods