我的啓動畫面正在工作,但我的應用程序在橫向模式下工作,啓動畫面以默認肖像模式顯示。如何在iOS上旋轉自定義啓動畫面?
如何啓動應用程序,以便啓動屏幕在風景模式之間旋轉,如我的應用程序?
我用下面的代碼:
- (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];
}
但我怎麼可以把顯示屏內的旋轉?
這篇文章對Xcode確實沒什麼用處。所以,我已經從你的標題中刪除了這個詞。 – 2010-12-07 06:53:32