2016-11-09 7 views
1

私は奇妙な問題に直面しています。私は コードを使用してローカル.htmlファイルを作成しました。コードはiOS9まで動作していますが、iOS10ではUIWebViewがスクロールしていません。UIWebViewは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]; 

答えて

0

てみ

self.myWebView.scrollEnabled = TRUE; 
+0

まだ同じ問題に直面して追加 –

+0

Tryself.myWebView.scalesPageToFit = TRUE; – stevenpcurtis

+0

また、clipstoboundsを使用していますか? – stevenpcurtis

関連する問題