iOS 全横屏app设置

1.设置device orientation  只要landscape(横屏)相关的属性

 

2.在AppDelegate 里添加

//设置只能显示横屏
    func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
        return  UIInterfaceOrientationMask.landscape
    }

3.到了这里 我们发现app是横屏了 但是启动页还不是横屏的

修改info 注意: 不要点击文件列表里面的info。

点击targets里面的 build setting 左边的info

然后选中你要的  Supported interface orientations    (iphone 或者ipad 根据你的需求来)里面的属性只要横屏的即可(Landscape (left home button),Landscape (right home button))

这样启动页也就横屏显示了 搞定。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值