• 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
Re: Equivelent to drawRect: for drawing after sub views are drawn
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Equivelent to drawRect: for drawing after sub views are drawn


  • Subject: Re: Equivelent to drawRect: for drawing after sub views are drawn
  • From: "John C. Randolph" <email@hidden>
  • Date: Thu, 7 Oct 2004 23:58:39 -0700


On Sep 30, 2004, at 4:13 AM, Ricky Sharp wrote:


On Thursday, September 30, 2004, at 01:30AM, George Lawrence Storm <email@hidden> wrote:


I need to perform the equivalent to NSView's drawRect:, however I need
it to be called AFTER its sub views are drawn.

Is there a method I can override for such a purpose?

I need to draw a transparent overlay & some guidelines which will
overlap some of those sub views.


I think you'll be better served by using an overlay window. That may also give you better performance as well.

Check out the following example:

<http://developer.apple.com/samplecode/FunkyOverlayWindow/ FunkyOverlayWindow.html>

Let me just chime in here, and point out that the technique demonstrated in the sample that Mr. Sharp has pointed out is supported, and that clobbering private methods is not. In fact, situations like this are precisely why we provided the -addChildWindow:ordered: method on NSWindow.

Mr. Storm's approach has a very high probability of failure on future releases.

-jcr


John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Equivelent to drawRect: for drawing after sub views are drawn
      • From: George Lawrence Storm <email@hidden>
  • Prev by Date: multiple documents, single window
  • Next by Date: To @try or not?
  • Previous by thread: [Wrap-up] Re: Equivelent to drawRect: for drawing after sub views are drawn
  • Next by thread: Re: Equivelent to drawRect: for drawing after sub views are drawn
  • Index(es):
    • Date
    • Thread