2011-08-10 49 views
0

在应用程序中,我只想支持UIInterfaceOrientationLandscapeRight。所以我为此做了两件事。 1)在proj plist文件中将初始界面方向设置为UIInterfaceOrientationLandscapeRight。 2)在每个视图控制器中编写该代码。 (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {interfaceIrl(UIInterfaceOrientationLandscapeRight);}} }iPad方向问题

但是,当我切换到另一个视图使用removeFromSuperview和addSubview方法来替换旧视图与新视图时,新视图的方向不正确。

 How to solve this problem ??? 

回答

2

转到您的项目的Info.plist(该文件将是Resources夹),然后添加这两个领域

I hope you know how to add fields

你只需要在左边添加键和可能的值会出现在右边