且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

UIWebView调整大小以适应内容

更新时间:2022-11-02 14:28:14

根据文档,大小适合:


调整并移动接收器视图,使其仅包含 子视图

Resizes and moves the receiver view so it just encloses its subviews.

这不会向您提供有关将webView纳入其包含视图的任何信息。
您的webView是否可能尝试显示比screenWidth更宽的内容,并且由于您将其滚动锁定,它会显示整个宽度?

This does not give you any information about fitting the webView into it's containing view. Is it possible that your webView is trying to display something wider than the screenWidth, and since you have it scroll locked, it is showing the whole width?