/** [self.window makeKeyAndVisible]必须放在最前面
*/
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//融云
[self.window makeKeyAndVisible];
[self createLaunchAnimation];
return YES;
}
-(void)createLaunchAnimation{
UIImageView *launchImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];NSString *path = [[NSBundle mainBundle] pathForResource:@"Defaultretein" ofType:@"jpg"];
launchImage.image = [[UIImage alloc] initWithContentsOfFile:path];
[self.window addSubview:launchImage];
[self.window bringSubviewToFront:launchImage];
[UIView animateWithDuration:3.0 animations:^{
launchImage.alpha = 0.0;
} completion:^(BOOL finished) {
[launchImage removeFromSuperview];
}];
}