IT虾米网

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

shasha 2018年06月24日 手机开发 1092 0

在- (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions 里添加

self.window.rootViewController.view.alpha = 0; 
UIImageView *splashImageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"splash"]]; 
[self.window addSubview:splashImageView]; 
[UIView animateWithDuration:0.7 animations:^{ 
    self.window.rootViewController.view.alpha = 1.0; 
} completion:^(BOOL finished) { 
    [addSubview:splashImageView removeFromSuperview]; 
}];

本文地址: http://www.starming.com/index.php?v=index&view=21
评论关闭
IT虾米网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!

iOS开发-AsynSocket