Quart 2D (DrawText)
http://blog.csdn.net/flyhawk007j2me/article/details/6829690有用代码
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSelectFont ( context, "Arial", 22, kCGEncodingMacRoman );
CGContextSetTextMatrix(context, CGAffineTransformMakeScale(1.0, -1.0));
CGContextSetRGBFillColor ( context, 0.0f, 0.6f, 0.f, 1.f );
CGContextSetRGBStrokeColor(context, 0.6,1,1,1);
// CGContextSetTextDrawingMode(context, kCGTextFill);
// CGContextShowTextAtPoint(context, 10.0, 30.0, kTextString, kTextStringLength);
//
// CGContextSetTextDrawingMode(context, kCGTextStroke);
// CGContextShowTextAtPoint(context, 60.0, 60.0, kTextString, kTextStringLength);
NSString* myStr = @"我是中国人!";
UIFont* font = [UIFont systemFontOfSize:12.0];
[myStr drawInRect: CGRectMake(10, 20, 100, 130) withFont:font lineBreakMode:UILineBreakModeWordWrap alignment:UITextAlignmentCenter];

浙公网安备 33010602011771号