- (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSelectFont(context, \"Arial\", 24, kCGEncodingMacRoman);
This is easier:
- (void)drawRect:(CGRect)rect { NSString* string = @"I am Rahul"; [string drawAtPoint:CGPointMake(80, 80) withFont:[UIFont systemFontOfSize:24]]; }
You can use this code :
CGContextSetTextMatrix(context, CGAffineTransformMake(1.0,0.0, 0.0, -1.0, 0.0, 0.0));