• 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: Correctly drawing a custom view...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Correctly drawing a custom view...


  • Subject: Re: Correctly drawing a custom view...
  • From: Jean-Nicolas Jolivet <email@hidden>
  • Date: Tue, 25 Nov 2008 10:32:43 -0500

I was actually reading the View Programming Guide... guess I was looking at the wrong place.

Thanks...


On 25-Nov-08, at 10:29 AM, I. Savant wrote:

Obviously my technique isn't working because when this happens, the area
around the control is getting filled with the gradient and the result is
definitely weird...

Have you read the Cocoa drawing guide? It goes into great detail about this very thing. The rect passed in via -drawRect: is only the part that the system determined needed redrawn. For optimization, you should try to only update that part of your view. If you don't care about this, just always use [self bounds].

 Read the docs.

--
I.S.

Jean-Nicolas Jolivet email@hidden http://www.silverscripting.com

_______________________________________________

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: Correctly drawing a custom view...
      • From: "I. Savant" <email@hidden>
References: 
 >Correctly drawing a custom view... (From: Jean-Nicolas Jolivet <email@hidden>)
 >Re: Correctly drawing a custom view... (From: "I. Savant" <email@hidden>)

  • Prev by Date: NSComboBox list is incorrect size on first dropdown
  • Next by Date: Re: NSComboBox list is incorrect size on first dropdown
  • Previous by thread: Re: Correctly drawing a custom view...
  • Next by thread: Re: Correctly drawing a custom view...
  • Index(es):
    • Date
    • Thread