Re: Equivelent to drawRect: for drawing after sub views are drawn
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