I am trying to draw in a CALayer subclass.
The drawInContext
is called with setNeedsDisplay
but nothing is drawn.
What am doing/getting wrong here ?
- (void)drawInContext:(CGContextRef)ctx
{
CGContextSetFillColorWithColor(ctx, [UIColor redColor].CGColor);
[[UIBezierPath bezierPathWithRect:CGRectMake(100, 100, 100, 100)] fill];
[@"Vowel" drawAtPoint:CGPointMake(0, 0) withFont:[UIFont fontWithName:@"Chalkboard" size:14]];
}
Edit I am getting this error :
CGContextAddPath: invalid context 0x0
Thanks Shani