问题
Uiwebview taking huge amount of time to load html content in iOS 7. The html content has mathjax library.
Its working good in iOS 5.1 and iOS 6.1.
Can you please help me how to fix this issue?
I am using loadRequest method to load html content into UIWebView.
Thanks, Rahman
回答1:
I have the same problem. After the update to iOS 7, the loadRequest takes about 10 seconds (with iOS 6 less than a second).
My code is like :
NSString *whichWiki = @"http://en.wikipedia.org/wiki/";
NSString *keyword = @"universe";
NSString *siteURLWiki =[NSString stringWithFormat:@"%@%@",whichWiki, keyword];
[webv loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:siteURLWiki]]];
I tried 2 resolutions I found in Google:
self.webv.dataDetectorTypes = UIDataDetectorTypeNone; // Resolution 1
self.webv.suppressesIncrementalRendering = YES; // Resolution 2
but with results of no effects.
Strangely, I have this problem with URL of Wikipedia but NOT WITH URL of Google. I can get URLs of Google search results less than a second.
What's the difference between Wikipedia and Google ???
回答2:
I unchecked the phone numbers detection on UIWebView from Storyboard. It works for me.
来源:https://stackoverflow.com/questions/19034433/uiwebview-taking-too-much-of-time-to-load-html-content-in-ios-7