Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/43.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 风景中的肖像_Iphone_Ios4_Interface Builder - Fatal编程技术网

Iphone 风景中的肖像

Iphone 风景中的肖像,iphone,ios4,interface-builder,Iphone,Ios4,Interface Builder,我正在使用Xcode 4中的界面生成器。我已经创建了一个480(宽)x320(高)的图像,用于我的应用程序的横向模式。在IB中,我将视图的方向设置为“横向”。我将图像放置在视图上。我已将“支持的设备方向”设置为横向letf/right。我已更改info.plist以支持横向方向 奇怪的是:当我运行应用程序时,模拟器确实会在横向旋转/启动,然而,我的图像也以某种方式旋转了90度,因此它看起来被裁剪了,只占屏幕的1/3左右 因此,为了简化解释,图像总是以与视图相反的旋转方向出现。我尝试删除.png文

我正在使用Xcode 4中的界面生成器。我已经创建了一个480(宽)x320(高)的图像,用于我的应用程序的横向模式。在IB中,我将视图的方向设置为“横向”。我将图像放置在视图上。我已将“支持的设备方向”设置为横向letf/right。我已更改info.plist以支持横向方向

奇怪的是:当我运行应用程序时,模拟器确实会在横向旋转/启动,然而,我的图像也以某种方式旋转了90度,因此它看起来被裁剪了,只占屏幕的1/3左右


因此,为了简化解释,图像总是以与视图相反的旋转方向出现。我尝试删除.png文件,重新添加并执行“清理”,但没有成功。有什么建议吗

您应该在所有视图控制器中修改您的shouldAutorotateToInterfaceOrientation方法,这些视图控制器应该是横向的:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {  
    if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) {  
        return YES;  
    } 
}