• 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: Ricky Sharp <email@hidden>
  • Date: Mon, 02 May 2005 09:17:46 -0500

On Monday, May 02, 2005, at 09:10AM, Nick Zitzmann <email@hidden> wrote:

>On May 2, 2005, at 7:55 AM, Ricky Sharp wrote:
>
>> In your case, it sounds like the other view is a sibling view?  If
>> that's the case, why not do the right thing in your controller layer?
>
>It's not that easy. The sibling view creates an NSImageView with an
>image, removes a previous NSImageView if one exists, and adds the new
>view as a subview to one of the sibling view's superviews, all during
>draw time.

I think this is the ultimate problem then.  I wouldn't be having your view do any view manipulation that would result in redraws from within drawRect (or other drawing methods).

It makes more sense to have your controller manage your views (i.e. adding, removing, etc.).  Each view in turn can then be solely responsible for just drawing itself.

--
Rick Sharp
Instant Interactive(tm)

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

  • Prev by Date: Re: Selector not working for me
  • Next by Date: Re: Redrawing a superview from another view's -drawRect: method
  • Previous by thread: Re: Redrawing a superview from another view's -drawRect: method
  • Next by thread: Re: Redrawing a superview from another view's -drawRect: method
  • Index(es):
    • Date
    • Thread