CALayer - delegate not being called?
CALayer - delegate not being called?
- Subject: CALayer - delegate not being called?
- From: Neil Clayton <email@hidden>
- Date: Wed, 28 Nov 2007 11:39:54 +1300
Hi All!
I'm playing around with CoreAnim, and having trouble getting delegates
working. I figure I must be doing something very very wrong here.
in awakeFromNib, of an NSView that is visible:
CALayer *main = [self setupLayer];
self.layer = main;
self.wantsLayer = YES;
This shows OK - as in I get a white border around the layer in my view
- since that's what I've setup in setupLayer.
- (CALayer*) setupLayer {
CALayer *layer = [CALayer layer];
[layer setDelegate:[[[SimpleDelegate alloc] init] retain]];
// Set the white border so I can tell the layer is there
[self setupBasicLayerProperties:layer];
return layer;
}
My delegate (SimpleDelegate) does this:
- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)theContext {
NSLog(@"go");
....
...
...
}
But I never see a "go" in console - it's never called.
I'm clearly missing something here - anyone got any pointers on
getting delegates/CALayer working as expected?
--
Regards,
Neil Clayton
_______________________________________________
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