Call NSView's -drawRect method manually
Call NSView's -drawRect method manually
- Subject: Call NSView's -drawRect method manually
- From: Nick <email@hidden>
- Date: Tue, 10 May 2011 19:26:34 +0300
helloo. Can someone explain please, when an NSView's call -drawRect
(being called manually - not by a framework) actually initiates
redrawing of the frame and displaying everything that it had drawn,
and when this call "doesn't initiate a thing"?
in some Apple samples is see that often to display a movie (a set of
frames) onto the view this method is being called manually from the
display link that is a part of NSView.
When i am calling [myCustomView drawRect:NSZeroRect] from somewhere
else than NSView's subclass' implementation code (a display link is
not located inside NSView's subclass implementation) it doesn't work.
I am obliged to use [myCustomView setNeedsDisplay:YES] which requires
adding synchronization and the code becomes kind of messy.
Is there a way to call drawRect and make sure the view actually redraws itself?
Thanks.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden