开发者

NSView - how can i redraw a subview without redrawing the parent view

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜