> Paul outlined a way to draw outside of drawRect: however I 
> think it
> would be better to use lockFocusIfCanDraw instead of 
> lockFocus.

Yes, I agree, although it begs the question of what to do if 
lockFocusIfCanDraw returns NO.  In my experience, that only 
happens when the view (or any of its ancestor views) is hidden 
so you can just give up in that case.  I agree also that drawing 
within drawRect: is much the best way, but it occurs to me that 
you might have a ton of existing code that doesn't see life in 
those terms.  I'd head in that direction though, if you can.

Paul Sanders.



_______________________________________________

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 arch...@mail-archive.com

Reply via email to