Reputation: 41
I have an image with a label that comes over it, but when I save photo to album, of course the label doesn't show up. How would I do this, I have search a lot, and nothing works.
Upvotes: 2
Views: 1505
Reputation: 89509
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.
Upvotes: 5