2016-11-09 3 views
1

Ich habe ein seltsames Problem. Ich habe eine lokale HTML-Datei mit dem folgenden Code erstellt. Der Code funktioniert bis iOS9, aber in iOS10 läuft UIWebView nicht.UIWebView nicht scrollen Problem in IOS 10

self.automaticallyAdjustsScrollViewInsets = NO; 
self.myWebView.delegate = self; 
self.myWebView.userInteractionEnabled = YES; 
NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"Sample" ofType:@"html"]; 
NSURL *baseURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]]; 
NSString *htmlBody = [[NSString alloc] initWithContentsOfFile:htmlFile usedEncoding:nil error:nil]; 
htmlBody = [htmlBody stringByReplacingOccurrencesOfString:@"Most-Common-Que3-Paragraph1" withString:@"In a small village, a little boy lived with his father and mother. He was the only son.The parents of the little boy were very depressed due to his bad temper"]; 
[self.myWebView loadHTMLString:htmlBody baseURL:baseURL]; 

Antwort

0

Versuchen

self.myWebView.scrollEnabled = TRUE; 
+0

hinzugefügt noch die gleiche Frage, die sich –

+0

Tryself.myWebView.scalesPageToFit = TRUE; – stevenpcurtis

+0

Verwenden Sie auch clipstobounds? – stevenpcurtis