国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > iOS > 正文

ios啟動頁強制豎屏(進入App后允許橫屏與豎屏)

2020-07-26 02:52:54
字體:
來源:轉載
供稿:網友

這篇文章主要介紹了在ios啟動頁強制豎屏,進入App后允許橫屏與豎屏的相關資料,需要的朋友可以參考下。

方法如下

1、修改App-info.plist(在XCode中General中設置 一樣的效果)

 <key>UISupportedInterfaceOrientations</key> <array>  <string>UIInterfaceOrientationPortrait</string> </array>

2、AppDelegate中:

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { return UIInterfaceOrientationMaskAllButUpsideDown;}

貼一下蘋果對這個的解釋,可以放心使用:

Discussion

This method returns the total set of interface orientations supported by the app. When determining whether to rotate a particular view controller, the orientations returned by this method are intersected with the orientations supported by the root view controller or topmost presented view controller. The app and view controller must agree before the rotation is allowed.

If you do not implement this method, the app uses the values in the UIInterfaceOrientation key of the app's Info.plist as the default interface orientations.

總結

以上就是這篇文章的全部內容了,希望本文的內容對各位iOS開發者們能帶來一定的幫助,如果有疑問大家可以留言交流,謝謝大家對武林網的支持。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 措勤县| 武义县| 邹城市| 乌兰察布市| 阿巴嘎旗| 庄浪县| 安吉县| 洪洞县| 柳州市| 柏乡县| 栖霞市| 汕尾市| 綦江县| 和平县| 佛教| 罗甸县| 大新县| 巴林右旗| 肃南| 磐安县| 蚌埠市| 南溪县| 临夏县| 贵南县| 广德县| 五指山市| 类乌齐县| 兴文县| 福建省| 敦化市| 苏尼特左旗| 嫩江县| 宝应县| 伊春市| 乌恰县| 顺昌县| 化州市| 错那县| 阿拉尔市| 阿坝| 新昌县|