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

首頁 > 系統 > iOS > 正文

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

2019-10-21 18:47:36
字體:
來源:轉載
供稿:網友

這篇文章主要介紹了在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開發者們能帶來一定的幫助,如果有疑問大家可以留言交流,謝謝大家對VEVB武林網的支持。


注:相關教程知識閱讀請移步到IOS開發頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 托里县| 镇原县| 团风县| 辽源市| 阿坝县| 陇南市| 全南县| 庆安县| 北海市| 博客| 上林县| 乐都县| 永丰县| 简阳市| 红原县| 英德市| 宝应县| 武安市| 固原市| 增城市| 河西区| 太谷县| 郸城县| 大埔区| 盱眙县| 四子王旗| 莒南县| 文安县| 滨海县| 南投市| 韩城市| 金乡县| 武汉市| 澳门| 乌鲁木齐县| 舟曲县| 焦作市| 黎川县| 武城县| 延边| 鲜城|