//splash is my imageView
splash=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];
splash.image=[UIImage imageNamed:@”talent1.png”];
activityindicator=[[UIActivityIndicatorView alloc]initWithFrame:CGRectMake(110, 220, 30, 30)];
[activityindicator startAnimating];
activityindicator.activityIndicatorViewStyle=UIActivityIndicatorViewStyleGray;
activityindicator.color =[UIColor blueColor] ;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
self.viewController = [[[TalentViewController alloc] initWithNibName:@”TalentViewController_iPhone” bundle:nil] autorelease];
} else {
self.viewController = [[[TalentViewController alloc] initWithNibName:@”TalentViewController_iPad” bundle:nil] autorelease];
}
self.window.rootViewController = self.viewController;
[self performSelector:@selector(splashmethod) withObject:splash afterDelay:3.0];
[self.viewController.view addSubview:splash];
[self.viewController.view addSubview:activityindicator];
[self.window makeKeyAndVisible];
return YES;
}
-(void)splashmethod
{
[activityindicator removeFromSuperview];
[splash removeFromSuperview];
}