On 15 Oct 2008, at 12:38 am, Antonio Nunes wrote:

As you can see from the image it looks like the view first draws itself correctly, then gets drawn for each of the other subviews, with its origin offset to match the origin of the subview in question. I don't understand why this happens.

You've made the classic error of assuming that 'rect' passed to drawRect: is your view's bounds. It's not. It's the area requiring update.

Replace all references to 'rect' with [self bounds] and all will be well. This must crop up at least once or twice a month.

hth,


Graham
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to