I have a NSView with a sub view. I want to be able to redraw the sub view (call its drawRect) without redrawing the parent view. Is that possible?
When i case setNee开发者_如何学CdsDisplay on he sub view, drawRect of the parent view also called.
One thing you can do to reduce unnecessary drawing is overide -isOpaque
and return YES.
Of course, you should only do this if the subview is in fact opaque.
精彩评论