我要开发一个只有横向视图的程序..也就是说.无论手机旋转成什么样都是横向视图...
现在有问题,就是启动程序的时候,显示出来的是纵向,而且格式错乱得厉害.不知道怎么显示横向视图.
我想请教一下,怎么实现这个需求.我只需要横向显示我的应用.
或者告诉我调用哪个方法或者设置可以让程序一启动就是横向视图..
现在有问题,就是启动程序的时候,显示出来的是纵向,而且格式错乱得厉害.不知道怎么显示横向视图.
我想请教一下,怎么实现这个需求.我只需要横向显示我的应用.
或者告诉我调用哪个方法或者设置可以让程序一启动就是横向视图..
解决方案 »
- 改变警告框中信息的对齐方式
- oc中代理的具体实现步骤和格式是啥?
- 发布应用到app store问题
- uitableview中显示图片,如何将图片自动撑满一行?
- 新人,求教OC语法相关
- 请问sortedArrayUsingDescriptors的升降序问题
- IOS开发-object-c 用@{}创建字典
- launchscreen.storyboard 强制横屏(iPad)
- 如何解决GoogleMaps中MyLocation在中国内部的偏移?
- majava14更新Catalina15时,在安装时一直卡在苹果logo界面
- 练手小作 UnitConvert1.1 发个20个码
- iphone 如何确认一个中文字符完成输入
PS:csdn的管理员们听到你这么说会很伤心滴~我也把答案贴出来吧。
每个viewcontroller里面都用这个- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Overriden to allow any orientation.return UIInterfaceOrientationIsLandscape(interfaceOrientation);} 更详细更系统的描述,看这里。
http://developer.apple.com/library/ios/#documentation/General/Conceptual/iPadProgrammingGuide/CoreApplication/CoreApplication.html下面是复制楼上的答案。
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
orUIInterfaceOrientationLandscapeRight