unregisterForPreviewing(withContext:)
Unregisters a previously registered view controller identified by its context object.
Declaration
func unregisterForPreviewing(withContext previewing: any UIViewControllerPreviewing)Parameters
- previewing:
The context object that was returned when you registered the view controller by calling the Registerforpreviewing(with:sourceview:) method.
Discussion
The system calls this method automatically when a 3D Touch-registered view controller is deallocated.
In some circumstances, you must explicitly call this method. This is the case if a registered view controller’s view hierarchy changes state, or if presenting a preview is otherwise no longer possible. In such cases, call this method.
See Also
Deprecated methods
setOverrideTraitCollection(_:forChild:)overrideTraitCollection(forChild:)attemptRotationToDeviceOrientation()registerForPreviewing(with:sourceView:)canPerformUnwindSegueAction(_:from:withSender:)didRotate(from:)dismissMoviePlayerViewControllerAnimated()forUnwindSegueAction(_:from:withSender:)presentMoviePlayerViewControllerAnimated(_:)rotatingFooterView()rotatingHeaderView()segueForUnwinding(to:from:identifier:)shouldAutomaticallyForwardRotationMethods()willAnimateRotation(to:duration:)willRotate(to:duration:)