2013-08-06 25 views

cevap

9

Bunun here için [yourString drawAtPoint:aPoint withAttributes:dictOfAttributes];

Dokümanlar kullanabilirsiniz.

Ya da görünüm hiyerarşinize bir UILabel ekleyebilirsiniz.

2

// grafiksel içerik başlar UIGraphicsBeginImageContext (imageSize);

//get the context for coreGraphics 
CGContextRef ctx = UIGraphicsGetCurrentContext(); 

CGContextSetTextDrawingMode(ctx, kCGTextFill); 
[[UIColor blackColor] setFill]; 
[@"yourstring" drawAtPoint:CGPointMake(0, 0) withAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"Helvetica" size:17]}]; 
//make image out of bitmap context 
UIImage *outputImage = UIGraphicsGetImageFromCurrentImageContext(); 
İlgili konular