views:

841

answers:

1

UIFont doesn't appear to manage color, is there a way to change the font color using UIStringDrawing.h or specifically:

- (CGSize)drawInRect:(CGRect)rect withFont:(UIFont *)font

Thanks

+2  A: 

Take a look at UIColor. Specifically:

- (void) setFill;

For example:

[[UIColor redColor] setFill];
[myString drawInRect:rect withFont:font];

Other methods include setStroke and just set to set both fill and stroke. Fonts use the fill color.

Ed Marty