/ Published in: Objective C
Used in MyTTable
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx { UIGraphicsPushContext(ctx); ..... UIFont *font = [UIFont boldSystemFontOfSize:13]; CGSize titletextSize = [data_title sizeWithFont:font]; textPoint.x = 0.8f * (CGRectGetWidth(layer.bounds) - titletextSize.width); CGContextDrawPath(ctx, kCGPathFill); [subject drawAtPoint:titlePoint withFont:font]; UIGraphicsPopContext(); }