iPhone/iPad 屏幕旋屏 iphone / ipod deployment info 调整
2013-06-13 14:55
465 查看
一般新建一个ViewController都会默认有以下这个函数- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation;
下面我们来定义各种旋转- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{return (interfaceOrientation == UIInterfaceOrientationPortrait); //只支持竖屏//return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); //除了倒置,其他方向都支持//return (interfaceOrientation == UIDeviceOrientationLandscapeRight); //只支持向右横屏//return (interfaceOrientation == UIDeviceOrientationLandscapeLeft); //只支持向左横屏}
如果不重写这个函数(也就是把这个函数完全注释),默认是只支持竖屏幕。
如果要在xib视图变成横屏,需要在Simulated Metrics的Orientation设置为Landscape。
如果让程序一启动就是横屏显示,就要在工程设置里的Summary的iPhone/iPod Deployment Info 改变 Supported Device Orientations 的选项
下面我们来定义各种旋转- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{return (interfaceOrientation == UIInterfaceOrientationPortrait); //只支持竖屏//return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); //除了倒置,其他方向都支持//return (interfaceOrientation == UIDeviceOrientationLandscapeRight); //只支持向右横屏//return (interfaceOrientation == UIDeviceOrientationLandscapeLeft); //只支持向左横屏}
如果不重写这个函数(也就是把这个函数完全注释),默认是只支持竖屏幕。
如果要在xib视图变成横屏,需要在Simulated Metrics的Orientation设置为Landscape。
如果让程序一启动就是横屏显示,就要在工程设置里的Summary的iPhone/iPod Deployment Info 改变 Supported Device Orientations 的选项
相关文章推荐
- iPhone/iPad 屏幕旋屏 iphone / ipod deployment info 调整
- ipad/iphone ,adjust your layout when orientation will be changing , 旋转屏幕时调整界面布局
- 在网站添加“添加至主屏幕”的自定义图标(iPhone,iPod,iPad)
- iPhone/iPad 屏幕旋屏
- iphone,iPad,iPod Touch屏幕分辨率(宽高)
- mmsplayer for ios 支持iphone ,ipad,ipod touch 版本已经完成。
- iphone/ipad:如何编程得到屏幕宽度?
- iOS开发人员必备App开发工具 ifunbox 支持iPhone, iPad和iPod Touch的文件及应用管理神器 使用实例
- iPhone/iPad调整事件递交
- iPhone/iPad/iPod Touch各设备参数对比
- iPhone, iPad, iPod – HTTP Live Streaming (HLS) with free tools on Windows
- iPhone和iPad屏幕的尺寸和分辨率
- IPad/IPhone屏幕翻转
- 旋转实现iOS(iPhone/iPad) 屏幕旋转响应函数的缺点与窗口大小位置调整,以及解决办法
- 用iArduino app+以太网插板实现“iPhone,iPad&iPod无线控制Arduino”!
- iAP Cracker for iPhone/iPod/iPad
- MetaTrader 5的手机为iPhone,iPod和iPad。如何安装
- jQuery的on绑定事件在mobile safari(iphone / ipad / ipod)上无法冒泡事件?
- いつでもどこでも本格的に麻雀&チュートリアルが充実!iPhone/iPod touch/iPad向け「雀龍門Mobile」をiPadで遊んでみました
- iPhone/iPad调整事件递交