4
我做了一個UIViewController像ShouldAutorotate和GetSupportedInterfaceOrientations不叫Xamarin.iOS
public class MyViewController : UIViewController
{
...
public override bool ShouldAutorotate()
{
return true;
}
public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations()
{
return UIInterfaceOrientationMask.AllButUpsideDown;
}
}
和AppDelegate.cs使用它。
Window.RootViewController = new MyViewController();
當我運行此代碼,「ShouldAutorotate」和「GetSupportedInterfaceOrientations」被稱爲鑑於初始化階段多次,但經過應用視圖中顯示,他們再也沒有叫。
我檢查了Info.plist中的方向設置是否有效。 iOS SDK Target爲7.1,Xamarin Studio Version爲5.0.1(build 3),Xamarin.iOS版本爲7.2.3.39。
任何想法?