views:

71

answers:

1

I have an OpenGL-based iPad project. In one view I have objects being rendered and floating on the screen.

When I add a transparent UIView on top of this view with a transparent table view with custom cells, I can see the table view and the objects still being rendered.

Now - when I go to drag on the table view to scroll through elements, the rendering halts. As soon as I release from dragging, rendering continues. Touching and not dragging on the table view does not cause the rendering to halt, only when dragging.

Has anyone ever encountered this? This happens on both the simulator and device.

My thinking: rendering for OpenGL occurs at a framerate determined by the hardware. When dragging on a UITableView, does the system allocate all of its resources to scrolling the table.

An answer with at least some code is desired!

Many thanks!

+2  A: 

Dragging an UIScrollView enters a modal loop that only processes certain run loop modes. Use CFRunLoopAddTimer to specify which run loop mode your timer runs under.

rpetrich
Where/how would I use this?
mark
That's dependent on how your application schedules the OpenGL draw calls. `CFRunLoopTimer`s are the CoreFoundation equivalent to `NSTimer` and aren't significantly more difficult to use.
rpetrich
In my experience, the OpenGL renderer is still being invoked, but the view is not redrawn. Plus, in the project template's code, a timer is only used for devices on which don't support CADisplayLink (which all iPads do, right?). I don't have an answer, though. :(
alltom
If you are using a `CADisplayLink` you will need to pass the appropriate mode into the `addToRunLoop:forMode:` method
rpetrich