iOS启动画面动画 [英] iOS splash Screen Animation
本文介绍了iOS启动画面动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的应用程序中,我希望启动画面动画我正在使用以下代码,但动画无效。
In my app I want the splash screen to be animated I'm using the following code but the animation is not working.
UIImageView *splashScreen = [[UIImageView alloc] initWithImage:[UIImage imageNamed: @"Default.png"]];
[self.window.rootViewController.view addSubview: splashScreen];
[self.window makeKeyAndVisible];
NSLog(@"begin splash");
[UIView animateWithDuration: 0.2
delay: 0.5
options: UIViewAnimationOptionCurveEaseOut
animations: ^{splashScreen.alpha = 0.0;
}
completion: ^ (BOOL finished) {
[splashScreen removeFromSuperview];
NSLog(@"end splash");
}
];
推荐答案
您无法为启动图像设置动画,但是您可以等到应用程序启动并添加自己的动画视图。
You can't animate the splash image, but you can wait until the app is launched and add your own view with an animation.
这篇关于iOS启动画面动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文