2013-06-30 85 views
0

我的應用程序中有一個WebView,可以正常工作,但載入速度非常慢。有沒有一種方法可以在應用程序啓動後立即開始加載Web視圖?應用程序啓動後立即加載WebView

感謝

[EconCalWebView setDelegate:self]; 
// Do any additional setup after loading the view. 
NSURL *myURL = [NSURL URLWithString:@"http://www.forexyard.com/en/calendar.iframe?zone_id=9493"]; 
NSURLRequest *myRequest = [NSURLRequest requestWithURL:myURL]; 
[EconCalWebView loadRequest:myRequest]; 

回答

0

你可以寫你的代碼裝載的WebView:在AppDelegate類可用

applicationDidFinishLaunching方法。

這裏您需要首先加載您的viewController,然後加載webView。

詳情請見:UIApplicationDelegate

相關問題