UIImage *image = [UIImage imageNamed:@"花"];
//开启图片类型的图形上下文
// opaque: 不透明度 YES:不透明 NO:透明
// size: 图片的的大小
// scale: 是否缩放,0 为不缩放
UIGraphicsBeginImageContextWithOptions(image.size, NO, 0);
//把图片画上去
[image drawAtPoint:CGPointZero];
//绘制文字(添加文字水印)
NSString *str = @"花儿好美呀";
[str drawAtPoint:CGPointMake(20, 20) withAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:30], NSForegroundColorAttributeName: [UIColor redColor]}];
//绘制logo图片(添加图片水印)
UIImage *logoImg = [UIImage imageNamed:@"logo"];
[logoImg drawAtPoint:CGPointMake(image.size.width - logoImg.size.width - 20 , image.size.height - logoImg.size.height - 20)];
//获取图片
image = UIGraphicsGetImageFromCurrentImageContext();
//关闭图片类型的图形上下文
UIGraphicsEndImageContext();
//把图片保存到系统相册
UIImageWriteToSavedPhotosAlbum(image, NULL, NULL, NULL);
最终在相册中的图片