【发布时间】:2013-12-19 17:51:24
【问题描述】:
我想以编程方式创建启动画面。
但它不显示启动画面。
请参考以下代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
UIImage *aSplashImage = [UIImage imageNamed:@"Splash.jpeg"];
UIImageView *aSplashImageView = [[UIImageView alloc] initWithFrame:self.window.frame];
aSplashImageView.image = aSplashImage;
UIView *aSplashView = [[UIView alloc]initWithFrame:self.window.frame];
[aSplashView addSubview:aSplashImageView];
[self.window addSubview:aSplashView];
return YES;
}
【问题讨论】:
-
你看到了什么?也请添加 [window makeKeyAndVisible];
-
@KunalBalani :我添加了相同的内容,但我看不到启动画面。还有什么建议吗?
-
为什么要减慢用户的速度?
标签: ios iphone objective-c ipad ios-simulator