iOS启动屏后再加个闪屏的方法

- (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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容