在iOS系統中,我會做這樣的:我需要做一個啓動畫面
splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 768, 1024)];
splashView.image = [UIImage imageNamed:@"Default.png"];
[window addSubview:splashView];
[window bringSubviewToFront:splashView];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:3.5];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:window cache:YES];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(startupAnimationDone:finished:context:)];
splashView.alpha = 0.0;
splashView.frame = CGRectMake(-60, -60, 900, 1200);
[UIView commitAnimations];
然後「推」視圖控制器去。
我已經看過各種實例和教程,不能讓上需要什麼樣的代碼句柄:(?動作)
- 顯示啓動畫面
- 讓它淡出
- 有另一種看法顯示。
有人發佈了這個我適應但評論代碼產生錯誤。我肯定錯過了什麼。
我不能幫你那裏,除了表明沒有人喜歡閃屏和你真的不應該打擾做一個。這是用戶會忽略或輕微惱火的一個功能。 – kwatford
有很多的例子,http://stackoverflow.com/questions/6918430/splash-screenhow-to-show-an-image-in-full-screen/6918484#6918484 – 2011-08-06 15:18:01