这是从以前的问题,我问了一个延续:iPhone View StrategyiPhone视图不会旋转
我现在用下面的方法来视图之间切换:
UIWindow *window = [[UIApplication sharedApplication] keyWindow];
[window setRootViewController:[self gameViewController]];
[[[self gameViewController] view] becomeFirstResponder];
我遇到的问题是我的视图没有正确旋转(状态栏旋转,但没有别的)。初始视图没问题,但是使用上述方法导航到的任何视图都存在旋转问题。
我在我所有的视图控制器的实现方法shouldAutorotateToInterfaceOrientation如下:
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES to allow autorotation
return YES;
}
这已成为一个有点棘手的问题对我来说。有任何想法吗?
谢谢你,艾伦
[完全重复](http://stackoverflow.com/questions/3773012/iphone-view-wont-rotate) – 2010-09-22 19:57:44
对不起,删除了另一个! – 2010-09-22 20:23:08
这不是切换视图的正常方式... – 2010-09-22 23:47:29