i want to show a UIWebView after splash screen disappear in the iPad app that i develop. it works but the problem is after splash screen disappear the RootViewController is seen after a couple of seconds the UIWebView is seen. here my codes. i dont know what can be wrong
Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self performSelectorOnMainThread:@selector(AdvertisementImage) withObject:self.window waitUntilDone:NO];
}
- (void) AdvertisementImage {
introWeb=[[UIWebView alloc] initWithFrame:CGRectMake(0, 20, 768, 1004)];
[introWeb loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://photos.modelmayhem.com/photos/100107/10/4b4625b0b3262.jpg"]]];
introWeb.backgroundColor=[UIColor clearColor];
introWeb.scalesPageToFit=YES;
introWeb.delegate=self;
for (id subview in introWeb.subviews)
if ([[subview class] isSubclassOfClass: [UIScrollView class]]){
((UIScrollView *)subview).bounces = NO;
[((UIScrollView *)subview) flashScrollIndicators];
}
introWeb.hidden=YES;
[self.window addSubview:introWeb];
}
- (void) finishAdv{
[introWeb removeFromSuperview];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
introWeb.hidden=NO;
[NSTimer scheduledTimerWithTimeInterval:10.0 target:self selector:@selector(finishAdv) userInfo:nil repeats: YES];
}