Re: Newbie NSView question.
Re: Newbie NSView question.
- Subject: Re: Newbie NSView question.
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 15 Oct 2003 09:38:48 -0700
On Oct 15, 2003, at 1:19 AM, Alastair J.Houghton wrote:
No, but if you want to draw from elsewhere, you need to call
-lockFocus and -unlockFocus on your view. Apple recommends that you
use -drawRect: and -setNeedsDisplay: (or -setNeedsDisplayInRect:) in
most cases, because it allows the system to determine when to redraw
your view (so redraw requests can be optimised),
I'm sure Alastair meant the right thing, however lest it be
misinterpreted:
It is recommended that you implement your drawing routines in
-drawRect:. You call setNeedsDisplay: or -setNeedsDisplayInRect: to
cause a redraw. You should not call -drawRect: directly to cause a
redraw.
mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.