I have added splash screen by doing project->General tab-> Launch Images->
From here i have taken two images according to the size and its working very fine too.
Now i want to put an Activity Indicator onto it.
So before loading of my DB and files, the splash as well as the indicator should be displayed.
What can i do for this?
I also tried after some suggestions
i did like this
[self performSelector:@selector(loadingViewFade) withObject:nil];
(void) loadingViewFade
loadingView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 320, 480)]; loadingView.image = [UIImage imageNamed:@"splashscreen_640x960"]; [_window addSubview:loadingView]; [_window bringSubviewToFront:loadingView]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:3.0]; [UIView setAnimationDelay:3.0]; [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:_window cache:YES]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(startupAnimationDone:finished:context:)]; loadingView.alpha = 0.5f; [UIView commitAnimations];
//Create and add the Activity Indicator to loadingView UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; activityIndicator.alpha = 1.0; activityIndicator.center = CGPointMake(160, 430); activityIndicator.hidesWhenStopped = NO; UILabel *text = [[UILabel alloc]initWithFrame:CGRectMake(140, 435, 160, 30)]; text.backgroundColor = [UIColor clearColor]; text.textColor = [UIColor whiteColor]; text.font = [UIFont systemFontOfSize:14]; text.text = @"Loading..."; [loadingView addSubview:text]; [loadingView addSubview:activityIndicator]; [loadingView addSubview:activityIndicator]; [activityIndicator startAnimating];
(void)startupAnimationDone:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
[loadingView removeFromSuperview];
Again the splash as well as the indicator isnt displaying rather the default screen is being loaded untill the database loads.. Please help me out