Upravit

Sdílet prostřednictvím


UIViewController.WillRotate(UIInterfaceOrientation, Double) Method

Definition

Called prior to a user interface rotation.

[Foundation.Export("willRotateToInterfaceOrientation:duration:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, "Use Adaptive View Controllers instead.")]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void WillRotate (UIKit.UIInterfaceOrientation toInterfaceOrientation, double duration);
abstract member WillRotate : UIKit.UIInterfaceOrientation * double -> unit
override this.WillRotate : UIKit.UIInterfaceOrientation * double -> unit

Parameters

toInterfaceOrientation
UIInterfaceOrientation

The new interface orientation.

duration
Double

The duration of the rotation, in seconds.

Attributes

Remarks

Application developers may override this method to disable expensive drawing operations, media playback, or other resource-intensive operations during a user interface rotation.

When this method is called, the InterfaceOrientation is set to the original UIInterfaceOrientation.

Applies to