iPhone SDK - UIWebView has a gray box on it

advertisements

Sometimes, my UIWebView will have a grey box over part or all of the content. I can't make heads or tails of why it's happening. It happens regularly for certain content.

Thanks!

--Update--

It seems to occur when the webview is not immediately viewable on the screen -- ie i've got a scrollview, and the webview is below the fold.

--Update #2--

When I bring the content above the fold, it loads fine most of the time. There are still instances when the grey box is still showing up. The weird part is if i double-tap it, it finishes loading the content just fine. bizarre

--Update #3--

Okay, so it seems to be that if my uiwebview has a height greater than 1000px, a grey box appears on the rest of the content below 1000px. A double-tap reveals the actual content.


All UIViews have a size limit of 1024x1024 pixels. This is stated at the end of the Overview section of the UIView documentation.

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.