3
到目前爲止,我有一個非常簡單的應用程序,它不會旋轉視圖。當應用程序啓動時調用ShouldAutorotateToInterfaceOrientation
,但在旋轉時再也不會再調用。我的代碼如下:iPad視圖不旋轉
public class NotebookSelectionController : UIViewController {
public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation) {
return true;
}
}
我的應用程序委託代碼如下:
public override bool FinishedLaunching(UIApplication app, NSDictionary options) {
var notebookController = new NotebookSelectionController();
window.AddSubview(notebookController.View);
window.MakeKeyAndVisible();
return true;
}
我在想什麼?