最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

ios啟動(dòng)頁(yè)強(qiáng)制豎屏(進(jìn)入App后允許橫屏與豎屏)

 更新時(shí)間:2017年03月25日 09:44:39   作者:Stevenzhai  
最近工作遇到這樣一個(gè)需要,當(dāng)進(jìn)入啟動(dòng)頁(yè)需要強(qiáng)制豎屏,而進(jìn)入APP后就允許橫屏與豎屏,通過(guò)查找相關(guān)的資料找到了解決的方法,所以將實(shí)現(xiàn)的方法整理后分享出來(lái),需要的朋友們可以參考借鑒,下面來(lái)一起看看吧。

這篇文章主要介紹了在ios啟動(dòng)頁(yè)強(qiáng)制豎屏,進(jìn)入App后允許橫屏與豎屏的相關(guān)資料,需要的朋友可以參考下。

方法如下

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

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

2、AppDelegate中:

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

貼一下蘋(píng)果對(duì)這個(gè)的解釋?zhuān)梢苑判氖褂茫?/strong>

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.

總結(jié)

以上就是這篇文章的全部?jī)?nèi)容了,希望本文的內(nèi)容對(duì)各位iOS開(kāi)發(fā)者們能帶來(lái)一定的幫助,如果有疑問(wèn)大家可以留言交流,謝謝大家對(duì)腳本之家的支持。

相關(guān)文章

最新評(píng)論

施甸县| 道真| 鄂尔多斯市| 札达县| 韩城市| 囊谦县| 普兰店市| 乌兰察布市| 固始县| 南靖县| 榆社县| 尼勒克县| 增城市| 七台河市| 汪清县| 镇巴县| 长泰县| 景谷| 玉山县| 容城县| 兰西县| 平江县| 安龙县| 巩留县| 竹山县| 汝城县| 元阳县| 塔河县| 克东县| 五常市| 额济纳旗| 盖州市| 新平| 福海县| 基隆市| 乌兰浩特市| 崇明县| 石屏县| 抚州市| 定远县| 吕梁市|