• 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: Redrawing a superview from another view's -drawRect: method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redrawing a superview from another view's -drawRect: method


  • Subject: Re: Redrawing a superview from another view's -drawRect: method
  • From: Shawn Erickson <email@hidden>
  • Date: Mon, 2 May 2005 08:44:01 -0700


On May 2, 2005, at 7:34 AM, j o a r wrote:


On 2005-05-02, at 16.28, Nick Zitzmann wrote:


Why are you doing this inside drawRect? That seems a bit weird to me.


The view must be able to draw something outside of its own frame without actually expanding that frame, _and_ must be drawn over the top of several neighboring views, and so it uses NSImageView to accomplish this.



Find some other way to solve this problem. Are you always drawing "outside" of your view frame? If so, make the frame of the view larger from the start. If not, resize the view when you receive the event that triggered the change. Don't use the drawing methods as the event to trigger these changes.

...or overlay a window and draw into that while it is doing this out of frame drawing operation. This way your drawing could even extend outside the window that contains your view.


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

-Shawn
_______________________________________________
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


References: 
 >Redrawing a superview from another view's -drawRect: method (From: Nick Zitzmann <email@hidden>)
 >Re: Redrawing a superview from another view's -drawRect: method (From: Ricky Sharp <email@hidden>)
 >Re: Redrawing a superview from another view's -drawRect: method (From: Nick Zitzmann <email@hidden>)
 >Re: Redrawing a superview from another view's -drawRect: method (From: j o a r <email@hidden>)
 >Re: Redrawing a superview from another view's -drawRect: method (From: Nick Zitzmann <email@hidden>)
 >Re: Redrawing a superview from another view's -drawRect: method (From: j o a r <email@hidden>)

  • Prev by Date: Re: Tiger gcc 4 builds apps that don't run on 10.2.8
  • Next by Date: Re: Final Tiger build number
  • Previous by thread: Re: Redrawing a superview from another view's -drawRect: method
  • Next by thread: 10.3.9 build errors "Carbon headers missing" ??
  • Index(es):
    • Date
    • Thread