I want to preload an URL via " didFinishLaunchingWithOptions" if my app starts. At this time I call the URL in the ViewController directly, but it takes too long to the the content, so I want to see the content from the URL directly.
At this time in my ViewController viewDidLoad:
[myWebView loadRequest:[NSURLRequest requestWithURL:
[NSURL URLWithString:NSLocalizedString(@"URL_today",@"URL-Calendar")]]]; // I localize the URL ;-)
loadingTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0/2.0) target:self selector:@selector(loading) userInfo:(nil) repeats:YES];
So, I think I have to create a method in my AppDelegate.
- (void) callURL{
[myWebView loadRequest:[NSURLRequest requestWithURL:
[NSURL URLWithString:NSLocalizedString(@"URL_today",@"URL-Calendar")]]];
loadingTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0/2.0) target:self selector:@selector(loading) userInfo:(nil) repeats:YES];}
Than call the method in the "didFinishLaunchingWithOptions"
[self callURL];
And now I have to call the result in my webView in the ViewController - viewDidLoad:
[URL-RESULT-show ]
Has anybody an idea, how to do it? THANKS.