you write the following code in appdelegate.m///////////
UIImage* image=[UIImage imageNamed:@"splash.png"];
splashView=[[UIImageView alloc]initWithImage:image];
[self.window addSubview:splashView];
[self.window bringSubviewToFront:splashView];
[self performSelector:@selector(removeSplash) withObject:self afterDelay:2];
[self.window makeKeyAndVisible];
-(void)removeSplash{
[UIView beginAnimations:nil context:nil];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:self.window cache:YES];
[UIView setAnimationDuration:0.75];
[UIView setAnimationDelegate:self];
[splashView removeFromSuperview];
[UIView commitAnimations];
[self.window addSubview:self.viewController.view];
}
UIImage* image=[UIImage imageNamed:@"splash.png"];
splashView=[[UIImageView alloc]initWithImage:image];
[self.window addSubview:splashView];
[self.window bringSubviewToFront:splashView];
[self performSelector:@selector(removeSplash) withObject:self afterDelay:2];
[self.window makeKeyAndVisible];
-(void)removeSplash{
[UIView beginAnimations:nil context:nil];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:self.window cache:YES];
[UIView setAnimationDuration:0.75];
[UIView setAnimationDelegate:self];
[splashView removeFromSuperview];
[UIView commitAnimations];
[self.window addSubview:self.viewController.view];
}
No comments:
Post a Comment