希望有人能在這裏指出我在我的Splash屏幕上做錯了什麼。問題是,在屏幕處於縱向模式,而不是景觀提前顯示...爲什麼我的ModalView以縱向模式顯示?
- (void)showSplash
{
UIView *modelView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1024 , 748)];
UIViewController *modalViewController = [[UIViewController alloc] init];
[modelView setBackgroundColor:[[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"Splash.png"]]];
modalViewController.view = modelView;
[self presentModalViewController:modalViewController animated:NO];
[self performSelector:@selector(hideSplash) withObject:nil afterDelay:5.0];
}的幫助
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
感謝。
通過啓動屏幕顯示http://stackoverflow.com/questions/3772016/modal-view-controller-wont-start-in-landscape-mode –
您的意思是應用程序啓動時顯示的默認圖像是否正確? – slonkar
是應用程序啓動時加載的一個... – Nathan