編輯

共用方式為


UIViewController.InterfaceOrientation Property

Definition

The current orientation of the interface.

[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 UIKit.UIInterfaceOrientation InterfaceOrientation { [Foundation.Export("interfaceOrientation")] [ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, "Use Adaptive View Controllers instead.")] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.InterfaceOrientation : UIKit.UIInterfaceOrientation

Property Value

The current UIInterfaceOrientation of the device.

Attributes

Remarks

This value represents the rotation of the interface necessary to keep the interface upright.

Note that in portrait modes, the P:UIKit.UIViewController.UIInterfaceOrientation will be the opposite of the Orientation. For example, if the device is rotated clockwise from upright so that it is in portrait mode with the home button on the left, the value of the UIInterfaceOrientation will be LandscapeLeft but the value of Orientation will be LandscapeRight.

Applies to

See also