简体   繁体   English

iOS 13 测试版中 WKWebView 的内在内容大小问题

[英]WKWebView's Intrinsic Content Size issue in iOS 13 beta

I am trying to get the height of WKWeb view when it gets loaded and change the height of the cell in table view using a delegate method.The below code works well till iOS 12 .我试图在加载 WKWeb 视图时获取它的高度,并使用委托方法更改表格视图中单元格的高度。下面的代码在 iOS 12 之前运行良好。

When I try to run in iOS 13 beta , the cell height keeps increasing as the intrinsic size keeps on increasing by one every time.当我尝试在 iOS 13 beta 中运行时,单元格高度不断增加,因为固有大小每次都增加 1。

Is there any way to stop this ?有什么办法可以阻止这种情况吗?

 override var intrinsicContentSize: CGSize {
        print("intrinsic content size id \(self.scrollView.contentSize.height)")
        self.delegate?.changeHeight(self.scrollView.contentSize.height,self.indexpathOfCell)
        return self.scrollView.contentSize
    }

该问题已在 Xcode11 beta7 中得到修复,并且内在内容大小按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM