Re: Newbie CALayer Questions
Re: Newbie CALayer Questions
- Subject: Re: Newbie CALayer Questions
- From: Bob Barnes <email@hidden>
- Date: Sun, 20 Jul 2008 17:21:53 -0700
On Jul 20, 2008, at 5:06 PM, Jens Alfke wrote:
On 20 Jul '08, at 5:00 PM, Bob Barnes wrote:
I have some questions related to CALayer drawing. I want to be able
to display images, text, 2D graphics or a PDF page. I'm able to
display an image by directly setting the contents property using a
CGImageRef or subclassing CALayer, overriding display and sending
setNeedsDisplay, but nothing I do seems to trigger the call to
drawInContext. I've tried using a delegate for the CALayer and
subclassing CALayer, but drawInContext never gets called. Is there
something fundamental that I'm missing?
I've found that you can't have both content and custom drawing; if you
set the layer's content property, its drawInContext: method won't be
called. Maybe that explains it?
—Jens
I should have been clearer. The CALayer is question has its contents
property set to nil. Calling setNeedsDisplay results in the display
method being called, but not the drawInContext method.
Bob
_______________________________________________
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