スプラッシュ スクリーンは機能していますが、アプリは横向きモードで動作し、スプラッシュ スクリーンはデフォルトの縦向きモードで表示されます。
アプリのようにスプラッシュ スクリーンがランドスケープ モード間で回転するようにアプリを起動するにはどうすればよいですか?
私は次のコードを使用しています:
- (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];
}
しかし、回転を表示画面内に配置するにはどうすればよいですか?