0
我试图只支持风景。有一个新的要求显示这个对话框,第一次解释了我们的应用程序的一些事情。因此,在这种被推出,在viewDidLoad中我的第一个视图控制器,我有这样的代码:介绍ModalViewController在启动时变成我的应用程序的方向
BOOL showFirstTimeUse = [[NSUserDefaults standardUserDefaults] boolForKey:@"ShowFirstTimeUse"];
if (!showFirstTimeUse) {
FirstUseViewController *tvc = [[FirstUseViewController alloc] initWithNibName:@"FirstUseViewController" bundle:nil];
tvc.modalPresentationStyle = UIModalPresentationFormSheet;
tvc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:tvc animated:YES];
[tvc release];
}
在FirstUseViewController
然后,我有这样的定义:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return UIInterfaceOrientationLandscapeLeft | UIInterfaceOrientationLandscapeRight;
}
在IB,我没有改变任何的默认设置。我基本上只是将一个UIWebView放到屏幕的左上角来显示我的数据并将它连接到一个插座,以便我可以轻松地显示格式化文本。
当我现在运行我的应用程序时,此视图控制器的演示文稿会导致我的应用程序以纵向而非横向启动。我该如何解决?谢谢。