IOSTips:啟動屏後再加個閃屏的方法

真煩人發表於2015-06-17

在- (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions 裡新增

cself.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];
}];

原文連結

相關文章