【发布时间】:2010-08-06 18:07:45
【问题描述】:
我正在尝试制作一个使用导航控制器的横向应用程序,但我无法让该应用程序以横向模式启动。一旦我在另一个视图中并使用 [self.navigation popToRootViewControllerAnimated:YES];那么根视图是横向的。为什么在应用启动时它不是横向的。
我已经在 Interface Builder 中将其置于横向模式,并且我已经实现了以下代码。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
谁能给我解释一下。我应该在 appdelegate 中做些什么吗?
【问题讨论】:
标签: iphone xcode sdk controller navigation