我的启动画面正常工作,但我的应用程序在横向模式下工作,并且启动画面以默认纵向模式显示。
如何启动应用程序,以便启动画面在我的应用程序等横向模式之间旋转?
我正在使用以下代码:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Overriden to allow any orientation.
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
interfaceOrientation == UIInterfaceOrientationLandscapeRight)
return YES;
else {
return NO; }
}
和启动画面
-(void)displayScreen {
UIViewController *displayViewController=[[UIViewController alloc] init];
displayViewController.view = displaySplashScreen;
[self presentModalViewController:displayViewController animated:NO];
[self performSelector:@selector(removeScreen) withObject:nil afterDelay:3.0];
}
-(void)removeScreen
{ [[self modalViewController] dismissModalViewControllerAnimated:YES];
}
但是我怎样才能把旋转放在显示屏里面呢?