So I have a custom UIView where users can draw things.
I'm assuming that means you've implemented -drawRect:
.
IIRC, by default (if UIView.clearsContextBeforeDrawing
is set), the context gets filled with the view's background colour, -drawRect:
gets called, and the resulting bitmap is drawn on screen instead of the background colour. Animating this would mean animating between the two bitmaps, which isn't something Core Animation is particularly good at. (I could be wrong about the details here, but it explains the behaviour).
The easiest fix is to set the background colour to [UIColor clearColor]
and animate the background colour of a view behind the one you are drawing to. This means the view will not need to be redrawn, only recomposited over the "background".