我有一张带有标签的图像,但是当我将照片保存到相册时,标签当然不会出现。我该怎么做,我搜索了很多,但没有任何效果。
问问题
1416 次
1 回答
5
I did a bit of research in other questions to come up with an answer for you (click here for the best and most detailed answer), but the short answer for you would be this:
If you do combine your label and image into one UIView
object (let's call it myView
), you can do something like this: something like this:
UIGraphicsBeginImageContext(myView.bounds.size);
[myView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
And the viewImage
UIImage
object would be what you save to the album.
于 2012-05-26T06:17:13.620 回答