iOS启动屏后再加个闪屏的方法
2016-05-11 12:00
253 查看
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window.rootViewController.view.alpha = 0; _splashImageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"Default"]]; _splashImageView.frame = [UIScreen mainScreen].bounds; [self.window addSubview:_splashImageView]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [UIView animateWithDuration:0.5 animations:^{ self.window.rootViewController.view.alpha = 1.0; } completion:^(BOOL finished) { [_splashImageView removeFromSuperview]; }]; }); return YES; }
自定义图片加载,延时时间,以及动画收回时间。
转载http://www.starming.com/index.php?v=index&view=21
相关文章推荐
- iOS视频播放Demo VideoPlayerDemo
- iOS视频播放Demo VideoPlayerDemo
- 表哥的iOS 与 JS
- iOS开发中JsonModel使用方法 详解
- ios 开发 怎么再xcode添加多个targets
- IOS开发报错- objc_msgSend()报错Too many arguments to function call ,expected 0,have3
- [转]iOS开发系列--通知与消息机制
- iOS开发------获取系统联系人(AddressBook篇)
- iOS应用程序生命周期(前后台切换,应用的各种状态)详解
- iOS开发各种证书问题
- IOS---如何获取当前的日期和时间(阴历阳历),并显示带阴历阳历24节气的日历
- iOS开发——判断用户是否开启了应用推送设置
- GCD定时器使用笔记 及 详细分析
- iOS runloop与定时器的使用
- IOS数据存储之归档/解档
- 我要永远地记住你!(iOS中几种数据持久化方案)
- iOS8推送消息的快速回复处理
- 深入了解iOS代理设计模式
- IOS开发中如何使用通知NSNotification传值
- iOS runloop