didRotate(from:)
Sent to the view controller after the user interface rotates.
Declaration
func didRotate(from fromInterfaceOrientation: UIInterfaceOrientation)Parameters
- fromInterfaceOrientation:
The old orientation of the user interface. For possible values, see Uiinterfaceorientation.
Discussion
Subclasses may override this method to perform additional actions immediately after the rotation. For example, you might use this method to reenable view interactions, start media playback again, or turn on expensive drawing or live updates. By the time this method is called, the interfaceOrientation property is already set to the new orientation. Your implementation of this method must call super at some point during its execution.
This method is called regardless of whether your code performs one-step or two-step rotations.
See Also
Deprecated methods
setOverrideTraitCollection(_:forChild:)overrideTraitCollection(forChild:)attemptRotationToDeviceOrientation()registerForPreviewing(with:sourceView:)unregisterForPreviewing(withContext:)canPerformUnwindSegueAction(_:from:withSender:)dismissMoviePlayerViewControllerAnimated()forUnwindSegueAction(_:from:withSender:)presentMoviePlayerViewControllerAnimated(_:)rotatingFooterView()rotatingHeaderView()segueForUnwinding(to:from:identifier:)shouldAutomaticallyForwardRotationMethods()willAnimateRotation(to:duration:)willRotate(to:duration:)