共用方式為


UIViewController.AttemptRotationToDeviceOrientation 方法

定義

以程式設計方式觸發檢視的旋轉。

[Foundation.Export("attemptRotationToDeviceOrientation")]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static void AttemptRotationToDeviceOrientation ();
static member AttemptRotationToDeviceOrientation : unit -> unit
屬性

備註

如果 傳 ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation)false ,這個方法可用來以程式設計方式觸發檢視旋轉。

適用於

另請參閱

  • <xref:UIKit.UIViewController.WillRotate>
  • <xref:UIKit.UIViewController.ShouldAutorotateToInterfaceOrientation>