About WKWebView display incomplete under iOS 10 - iOS10.3 system

Recently, I am developing a software. Using WKWebView, I need to dynamically obtain the height of the webView and set it to the tableView, but after the refresh, a large part of the web elements are lost. It is no problem in iOS11.

Finally found that you need to re-setNeedsLayout when the tableView slides

- (void)scrollViewDidScroll:(UIScrollView *)scrollView

{

    if (scrollView == _mainTableView) {

        [_webMyView setNeedsLayout];

    }

}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327079465&siteId=291194637