0

I'm using UIWebView to load my HTML string,

NSMutableString * str;
str = [NSMutableString new];
[str appendString:@"<html><head><title>HO</title></head><body>"];
[str appendString:content];
[str appendString:@"</body></html>"];
[webView loadHTMLString:str baseURL:nil];

It works fine before, but when I update to iOS 10, it didn't load anymore.

Does anyone know why it happened?

2 Answers 2

2

Thank you for responding,

I've just solve my problem.

In webviewdidfinishload,

    webViewHeight = [[webView stringByEvaluatingJavaScriptFromString:@"document.body.scrollHeight"] floatValue];

I changed document.height to document.body.scrollHeight.

Sign up to request clarification or add additional context in comments.

1 Comment

Youre a life saver!!
0

I tested and your code still work well on iOS 10.2. Please check content or post a sample.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.