views:

550

answers:

4

I need to use a website with quite a bit of content in my App via UIWebView.

When I scroll the page in Mobile Safari everythings scrolls smoothly. Even if I scroll fast - the grey squared background appears but is rendered properly after a few moments (less then 0.5 seconds).

The same page in UIWebView scrolls jerkily if scrolled fast and doesn't show the grey squared background. I guess Mobile Safari shows the grey squared background first and renders after that while UIWebview stops the scrolling until the part which will be shown is rendered.

How to I tell UIWebView to behave like Mobile Safari?

Thanks Hannes

A: 

Any example or clue? how to use CATiledLayer with a UIWebview?

Thanks Franky

franky
A: 

Having the same problem, can you please post an example on how to use it with uiwebview ? Thanks

+2  A: 

It is already being drawn on it's own custom tiledLayer. The problem is that it is by default attempting to draw itself on the main thread so it locks up when I can't be drawn. There is a private message you can call

-(void)_setDrawInWebThread:(BOOL)arg1

That will work BUT you will see empty space when you scroll too fast and it can't keep up with the drawing until it has time to catch up. They use:

-(void)_setDrawsCheckededPattern:(BOOL)arg1

in mobile safari to help with this.

Patrick