views:

14

answers:

0

My iPad application is very simple:

  1. There's a Window, with a child View of class ContextView (my own)
  2. ContextView's background (as definied in Interface Builder) has a green background, and is Opaque. Clear Context Before Drawing is off (for both Window and UIView.)
  3. CADisplayLink selector calls setNeedsDisplay once a frame update.
  4. The drawRect method just draws a 64x64 image at random location on screen.

My problem is. It's too damn slow! Performance monitors show less than 30 fps for one sprite on screen.

One of the causes is that it fills the background with the color defined in Interface Builder, regardless the Clear Context checkbox. So I always see just ONE sprite on screen, rather just millions of sprites (one drawn every frame.)

How do I disable this? I don't want iPad to clear the rect, I want to handle it myself.

Thanks!