Re: UI elements in custom view mess up drawing
Re: UI elements in custom view mess up drawing
- Subject: Re: UI elements in custom view mess up drawing
- From: Antonio Nunes <email@hidden>
- Date: Tue, 14 Oct 2008 15:16:45 +0100
On 14 Oct 2008, at 14:43, Benjamin Stiglitz wrote:
The rect passed to -[NSView drawRect:] is the dirty rect of the view,
not the bounds of the view. The changing subviews are dirtying your
view
and then you're drawing as if that changed area was your complete
frame.
Try replacing your use of rect with -[NSView bounds] instead
Argh! I had a sinking feeling my brain was muddled up. It works now
(the view that is, not sure about the brain ;-). Thanks!
-António
----------------------------------------------------
It is better to light a candle than to curse the darkness
----------------------------------------------------
_______________________________________________
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