我使用下一个代码来创建 png 文件。我需要用 Arial 24 写一些文字。我该怎么做?我找不到可以设置 Arial 字体样式的位置。
UIImage *image = [BSSharedObject getInstance].downloadedImage;
UILabel *label = [[UILabel alloc]init];
UIFont *font = [UIFont systemFontOfSize:24.0];
UIGraphicsBeginImageContextWithOptions(CGSizeMake(WIDTH, HEIGHT), NO, 1.0);
[message drawInRect:CGRectMake(INDENT, INDENT, WIDTH - 2 *INDENT ,600) withFont:font lineBreakMode:UILineBreakModeWordWrap alignment:UITextAlignmentLeft];
[image drawInRect:CGRectMake((WIDTH - INDENT - image.size.width), (HEIGHT - INDENT- image.size.height), image.size.width, image.size.height)];
UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[BSSharedObject getInstance].createdImage = resultImage;
UIImage *im = [BSSharedObject getInstance].createdImage;
return resultImage;