viewDidUnload
Called when the controller’s view is released from memory.
Declaration
- (void) viewDidUnload;Discussion
In iOS 5 and earlier, when a low-memory condition occurred and the current view controller’s views were not needed, the system could opt to call this method after the view controller’s view had been released. This method was your chance to perform any final cleanup. If your view controller stored separate references to the view or its subviews, you could use this method to release those references. You could also use this method to remove references to any objects that you created to support the view but that are no longer needed now that the view is gone. You would not use this method to release user data or any other information that cannot be easily recreated.
In iOS 6 and later, clearing references to views and other objects in your view controller is unnecessary.
At the time this method is called, the view property is nil.
See Also
Deprecated methods
setOverrideTraitCollection(_:forChild:)overrideTraitCollection(forChild:)attemptRotationToDeviceOrientation()registerForPreviewing(with:sourceView:)unregisterForPreviewing(withContext:)automaticallyForwardAppearanceAndRotationMethodsToChildViewControllerscanPerformUnwindSegueAction(_:from:withSender:)didAnimateFirstHalfOfRotationToInterfaceOrientation:didRotate(from:)dismissModalViewControllerAnimated:dismissMoviePlayerViewControllerAnimated()forUnwindSegueAction(_:from:withSender:)presentModalViewController:animated:presentMoviePlayerViewControllerAnimated(_:)rotatingFooterView()