【发布时间】:2011-10-24 01:44:41
【问题描述】:
在应用程序中,我只想支持 UIInterfaceOrientationLandscapeRight。所以我为此做了两件事。 1)在proj plist文件中将初始界面方向设置为UIInterfaceOrientationLandscapeRight。 2)在每个视图控制器中编写此代码。 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return(interfaceOrientation==UIInterfaceOrientationLandscapeRight); }
但是当我使用 removeFromSuperview 和 addSubview 方法切换到另一个视图以用新视图替换旧视图时,新视图的方向不正确。
How to solve this problem ???
【问题讨论】: