• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Call NSView's -drawRect method manually
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Call NSView's -drawRect method manually
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: setState has no effect on an NSButton
  • Next by Date: Re: Call NSView's -drawRect method manually
  • Previous by thread: Re: IB 3x plug-in: How to add custom control which is NSMatrix with custom controls inside?
  • Next by thread: Re: Call NSView's -drawRect method manually
  • Index(es):
    • Date
    • Thread