How can I draw a text in drawRect? Thanks in advance
+2
A:
The NSString class has several methods for drawing itself. Look in the docs for NSString(UIStringDrawing).
Jongsma
2009-09-21 06:54:00
A:
You can also look at the CoreGraphics functions for doing this, though, Jongsma's method tends to be a little easier to use. Look at the apple docs for the NSString UIKit additions.
pzearfoss
2009-09-21 12:58:57
+1
A:
Example:
NSString *test = [[NSString alloc] initWithString:@"test"];
[test drawAtPoint:CGPointMake(200,200) withFont:[UIFont fontWithName:@"Helvetica" size:23 ]];
Jordan
2009-09-21 13:18:43