国产探花免费观看_亚洲丰满少妇自慰呻吟_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開發者們能帶來一定的幫助,如果有疑問大家可以留言交流,謝謝大家對武林網的支持。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 康马县| 安塞县| 大厂| 彭水| 六枝特区| 朝阳县| 城固县| 全南县| 镶黄旗| 平邑县| 石家庄市| 舞钢市| 三亚市| 武强县| 温泉县| 石狮市| 古浪县| 甘肃省| 潼南县| 郓城县| 静海县| 青铜峡市| 丘北县| 弋阳县| 晴隆县| 通河县| 金坛市| 轮台县| 夏河县| 株洲县| 惠水县| 巴南区| 青州市| 新兴县| 饶平县| 兴国县| 九寨沟县| 南和县| 乳山市| 息烽县| 前郭尔|