UIViewController.ViewWillUnload Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
In iOS 6 and later, this method is never called. In prior versions it was called prior to the controller’s view was released from memory.
[Foundation.Export("viewWillUnload")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void ViewWillUnload ();
abstract member ViewWillUnload : unit -> unit
override this.ViewWillUnload : unit -> unit
- Attributes
Remarks
In iOS 6 and later, UIView's that are referenced by live objects are not scavenged during low-memory situations. In other words, in iOS 6 and later, this method is never called. In previous versions, application developers may override this method to ensure that the state of the view can be restored when it is re-initialized.