There is a strange problem in my application in which it shows a black screen for a while before it downloads my splash screen. This black screen is not associated with any current operation, since I first download my splash screen and then run the xml parsing task.
I even tried to use [window makeKeyAndVisible] ;, but in vain.
This' my code is:
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
comingFromLogin = NO;
gotInternet = [self checkInternet];
if ( gotInternet == 0)
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Sorry No Network Available" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
else
{
[self didLoadSplashScreen];
}
}
-(void)didLoadSplashScreen
{
activity_indicator = [[ActivityIndicator alloc]initWithNibName:@"ActivityIndicator" bundle:nil];
splashScreen = [[splashScreenView alloc]initWithNibName:@"splashScreenView" bundle:nil];
splashScreen.view.alpha = 1.0;
splashScreen.view.frame = CGRectMake(0, 20, 320, 480);
[window addSubview:splashScreen.view];
[window addSubview:activity_indicator.view];
[window makeKeyAndVisible];
[self disappearSplashScreen];
}
Can anyone help?
This black screen stays about 2 seconds. I am running it on iOS4.
Thanx in advance.
neha source
share