Hi-
I am trying to subclass CALayer, but for some reason drawInContext is not getting called.
In the init method subclass I have [self setNeedsDisplay] which calls -(void)display if I have it in there, but not
- (void)drawInContextCGContextRef)ctx
I am invoking this in the applicationDidFinishLaunching method of my main app file simply like this:
CALayer *root = [theView layer];
TileViewNew *theLayer = [[TileViewNew alloc] init];
[root addSublayer:theLayer];
Any ideas what I'm doing wrong? The docs say drawInContext should get called when setNeedsDisplay is called.
Thanks!
I am trying to subclass CALayer, but for some reason drawInContext is not getting called.
In the init method subclass I have [self setNeedsDisplay] which calls -(void)display if I have it in there, but not
- (void)drawInContextCGContextRef)ctx
I am invoking this in the applicationDidFinishLaunching method of my main app file simply like this:
CALayer *root = [theView layer];
TileViewNew *theLayer = [[TileViewNew alloc] init];
[root addSublayer:theLayer];
Any ideas what I'm doing wrong? The docs say drawInContext should get called when setNeedsDisplay is called.
Thanks!