html - UIWebView scrolls slowly in iOS9 after load 50+ times -
i have uiwebview app contains local html files&css&js. in ios8 or previous,when load html string 50+ times in app bundle,it scrolls normal , not lag. in ios9,when load html string 50+ times,the scrollview of uiwebview become more , more slow.
i have create new project.just reload local html string.after load many times(50~100+),the scrollview becomes slow.a url request can cause slow well.
here new proj,you can run in device or simulator in ios9.it can reproduce.but when run in ios8,everything allright.
- (void)viewdidload { [super viewdidload]; uiwebview *wv = [[uiwebview alloc] initwithframe:self.view.bounds]; [self.view addsubview:wv]; self.webview = wv; self.webview.delegate = self; self.request= [nsurlrequest requestwithurl:[nsurl urlwithstring:@"http://www.google.com"]]; [self.webview loadrequest:self.request]; self.refreshcount = 0; } - (void)webviewdidfinishload:(uiwebview *)webview { [self.webview loadrequest:_request]; nslog(@"refreshcount = %lu",(unsigned long)_refreshcount++); }
any solution?
use gcd's or nsoperationqueues in order load them quickly.
Comments
Post a Comment