I'm having trouble drawing a string in a custom CALayer. The drawInContext method is called but nothing is visible on the screen. I can fill the layer with a solid colour but can't seem to draw a string onto it.
Any suggestions? Thanks.
- (void)drawInContext:(CGContextRef)ctx
{
CGContextSaveGState(ctx);
NSString *myString = @"Hello World";
NSDictionary *attr = [NSDictionary dictionaryWithObjectsAndKeys:
[NSFont systemFontOfSize:14], NSFontAttributeName, nil];
[myString drawAtPoint:NSMakePoint(0,0) withAttributes:attr];
CGContextRestoreGState(ctx);
}