On Feb 11, 2010, at 3:44 PM, PCWiz wrote:

> I'm trying to do some custom drawing in a CALayer subclass by overriding the 
> drawInContext: method, but it appears that its not being called. In my 
> subclass I just have this:
> 
> However, the drawInContext method is never called. What am I doing wrong here?

Layers (unlike views) start life validated. You need to call the layer's 
-setNeedsDisplay method for your -drawInContext: method to be called, so you 
should add a [lines setNeedsDisplay] call at some point.
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

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