[英]Orientation for only single screen in cordova iOS app
我在我的cordova iOS應用程序中使用的是“ screen.lockOrientation(“ portrait”)”。 現在,我想從一個插件顯示一個UIViewController。 該代碼如下:
[self.viewController presentViewController:self.myViewController animated:YES completion:nil];
我想允許該ViewController的兩個方向,但該視圖僅支持縱向。
我如何只支持從插件添加的一個屏幕(UIViewController)的方向?
您可以將控制器的xib中的direction屬性設置為橫向。 由於這是一個的viewController,你應該有shouldAutorotateToInterfaceOrientation方法,這樣你就可以在這里設定的方向為好。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.