xcode5 设置横屏 兼容ios5
2013-12-06 14:57
218 查看
重载shouldAutorotateToInterfaceOrientation:方法,这种方式是可行的。具体如下:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return ((interfaceOrientation ==UIDeviceOrientationLandscapeLeft)||(interfaceOrientation ==UIDeviceOrientationLandscapeRight));
}
如果有全局设置的方法,谢谢留言
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return ((interfaceOrientation ==UIDeviceOrientationLandscapeLeft)||(interfaceOrientation ==UIDeviceOrientationLandscapeRight));
}
如果有全局设置的方法,谢谢留言
相关文章推荐
- IOS6旋转屏、锁定横屏的实现(兼容IOS5)
- Xcode6中如何设置兼容iOS5?
- Unity3D -- 设置Android支付横屏竖屏
- android 强制设置横屏 判断是横屏还是竖屏
- ubuntu arm-linux-gcc 的安装 64位设置兼容32位的实现
- ios系统针对底部input设置fixed的输入框不兼容问题
- iOS5兼容 framework Optional
- 将某些数据库行为设置为与指定的 SQL Server 版本兼容
- Android强制设置横屏或竖屏
- div的最小高度设置兼容各浏览器
- SQL Server 2005将某些数据库行为设置为与指定的 SQL Server 版本兼容
- 设置默认全屏、横屏
- 使用X-UA-Compatible来设置IE浏览器兼容模式
- Android强制设置横屏或竖屏
- Android强制设置横屏或竖屏
- JavaScript 获取/设置光标位置,兼容Input&&TextArea
- 使用Fragment兼容手机平板-之设置主界面的模仿简单实现
- 如何用代码设置控制自己网站的网页在360浏览器打开时强制优先使用极速模式,而非兼容模式
- [CSS学习网站地址]兼容IE6/IE7/FF的页面最小宽度设置
- AndrowListView实现(自定义游戏列表)防止屏幕闪烁,设置分割线android中不推荐的方法,要考虑向下兼容,用了推荐的新方法,可能不兼容旧版本系统的手机