29,028
社区成员
发帖
与我相关
我的任务
分享
//image是你要增加水印的底图
UIGraphicsBeginImageContext(image.size);
CGContextRef context = UIGraphicsGetCurrentContext();
//设置水印颜色
[[UIColor whiteColor] set];
[title drawInRect:CGRectMake((image.size.width-[title sizeWithFont:font].width)/2+8, -30+(30-[title sizeWithFont:font].height)/2, 100, 30) withFont:font];
//获得加好水印的图片
result = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();