UIViewController.PreferredInterfaceOrientationForPresentation UIViewController.PreferredInterfaceOrientationForPresentation Method

Definition

The orientation that best displays the content of this UIViewController.

[Foundation.Export("preferredInterfaceOrientationForPresentation")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual UIKit.UIInterfaceOrientation PreferredInterfaceOrientationForPresentation ();
abstract member PreferredInterfaceOrientationForPresentation : unit -> UIKit.UIInterfaceOrientation
override this.PreferredInterfaceOrientationForPresentation : unit -> UIKit.UIInterfaceOrientation

Returns

The default value is the first entry in the “Supported Interface Orientations” list in Info.plist or, in an already running application, the current orientation of the status bar.

Remarks

If an application supports more than one orientation, the system uses this orientation when first presenting the UIViewController in full screen. The application developer should set this to the UIInterfaceOrientation that best displays the content view.

Applies to