如何在iPhone上显示比默认时间更长的闪屏?
发布于 2009-02-16 13:53:20
阅读苹果iPhone人机接口指南(HIG)。“闪屏”不应该是用来做品牌宣传或显示标志的,它应该看起来像是应用程序的默认状态,所以它看起来启动起来很快。
让它在那里停留更长时间将违反HIG。
发布于 2009-02-16 13:53:17
要做到这一点,最简单的方法是创建一个镜像为您的Default.png的UIImageView。在applicationDidFinishLaunching:方法中,将图像视图添加到窗口中,并在希望闪屏消失时将其隐藏。
发布于 2009-05-27 04:04:58
我需要这样做,以阻止显示表视图,直到通过网络加载数据为止。我使用了我在这里找到的一个变体:
http://michael.burford.net/2008/11/fading-defaultpng-when-iphone-app.html
在App Delegate的界面中:
@interface AppDelegate : NSObject
{
UIImageView *splashView;
}
在实现中:
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// After this line: [window addSubview:tabBarController.view];
splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
splashView.image = [UIImage imageNamed:@"Default.png"];
[window addSubview:splashView];
[window bringSubviewToFront:splashView];
// Do your time consuming setup
[splashView removeFromSuperview];
[splashView release];
}
确保您的资源中有一个Default.png
https://stackoverflow.com/questions/553336
复制相似问题