I have UIWebView within a UIScrollView. Then as I scroll, the web view displays first two pages correctly but does draws only half of the third the page. If I tap on the web view it draws the content or if I call -[UIWebView reload]
in -scrollViewDidEndDecelerating
, it shows the content.
我在UIScrollView中有UIWebView。然后,当我滚动时,web视图正确地显示了前两个页面,但是只绘制了第三个页面的一半。如果我点击web view它会绘制内容或者如果我调用-[UIWebView reload] in - scrollviewdidendslow,它会显示内容。
Is there any way I can make the web view draw correctly?
有什么方法可以让web视图正确绘制吗?
2 个解决方案
#1
2
UIWebViews cannot be loaded concurrently. You must load one, wait til it finishes, then load the next, and so on.
不能同时加载UIWebViews。您必须加载一个,等待它完成,然后加载下一个,依此类推。
You can do this on a timer, or wait until when the scrolled UIWebView has the focus before loading the data.
您可以在计时器上执行此操作,或者等到滚动的UIWebView具有焦点时再加载数据。
#2
0
All UIViews have a size limit of 1024x1024 pixels. This is stated at the end of the Overview section of the UIView documentation.
所有uiview的大小限制都是1024x1024像素。这在UIView文档的总览部分的末尾说明。
If your web view must have more than 1024px of content, you will have to take it out of the parent scroll view and let it manage scrolling on its own.
如果您的web视图必须包含超过1024px的内容,那么您必须将其从父滚动视图中取出,并让它自己管理滚动。
#1
2
UIWebViews cannot be loaded concurrently. You must load one, wait til it finishes, then load the next, and so on.
不能同时加载UIWebViews。您必须加载一个,等待它完成,然后加载下一个,依此类推。
You can do this on a timer, or wait until when the scrolled UIWebView has the focus before loading the data.
您可以在计时器上执行此操作,或者等到滚动的UIWebView具有焦点时再加载数据。
#2
0
All UIViews have a size limit of 1024x1024 pixels. This is stated at the end of the Overview section of the UIView documentation.
所有uiview的大小限制都是1024x1024像素。这在UIView文档的总览部分的末尾说明。
If your web view must have more than 1024px of content, you will have to take it out of the parent scroll view and let it manage scrolling on its own.
如果您的web视图必须包含超过1024px的内容,那么您必须将其从父滚动视图中取出,并让它自己管理滚动。