Re: CALayer - delegate not being called?
Re: CALayer - delegate not being called?
- Subject: Re: CALayer - delegate not being called?
- From: Paul Goracke <email@hidden>
- Date: Tue, 27 Nov 2007 22:12:50 -0800
On Nov 27, 2007, at 2:39 PM, Neil Clayton wrote:
I'm clearly missing something here - anyone got any pointers on
getting delegates/CALayer working as expected?
This may be abuse and/or overkill, but when I was working with CA
recently, I could only get the delegates to be called when I set
"layer.needsDisplayOnBoundsChange=YES;" (or override +
(id)defaultValueForKey:(NSString *)key to return [NSNumber
numberWithBool:YES] for @"needsDisplayOnBoundsChange").
BTW, this line scares me:
[layer setDelegate:[[[SimpleDelegate alloc] init] retain]];
You have the implicit retain from "init", then you're retaining again,
then I assume the layer also retains it in setDelegate. Are you sure
you don't mean "autorelease" instead of "retain"?
pg
_______________________________________________
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