Iphone 通过didFinishLaunchingWithOptions和调用ViewController webview预加载NSURL
如果我的应用程序启动,我想通过“didFinishLaunchingWithOptions”预加载URL。 此时,我直接在ViewController中调用URL,但访问内容花费的时间太长,因此我希望直接从URL查看内容 此时在我的ViewController viewDidLoad:Iphone 通过didFinishLaunchingWithOptions和调用ViewController webview预加载NSURL,iphone,ios,webview,nsurl,preloader,Iphone,Ios,Webview,Nsurl,Preloader,如果我的应用程序启动,我想通过“didFinishLaunchingWithOptions”预加载URL。 此时,我直接在ViewController中调用URL,但访问内容花费的时间太长,因此我希望直接从URL查看内容 此时在我的ViewController viewDidLoad: [URL-RESULT-show ] 因此,我想我必须在AppDelegate中创建一个方法。 - (void) callURL{ [myWebView loadRequest:[NSURLRequest re
[URL-RESULT-show ]
因此,我想我必须在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];}
然后调用“didFinishLaunchingWithOptions”中的方法
现在我必须在ViewController-viewDidLoad:
[URL-RESULT-show ]
有人有主意吗,怎么做?谢谢。请提高您的接受率是的,您提出了18个问题,接受了5个。
[URL-RESULT-show ]