开发者

How to take graphics drawn in the UIView and save as a jpg or something else on the iPhone to pull up in the "Photos"?

How to take graphics drawn in the UIView and save as a jpg or something o开发者_开发技巧n the iPhone to pull up in the "Photos" and or attach to an email?

thanks


It's fairly straightforward to get a UIImage:

UIImage* image = nil;

UIGraphicsBeginImageContext(_myView.frame.size);
{
    [_myView.layer renderInContext: UIGraphicsGetCurrentContext()];
    image = UIGraphicsGetImageFromCurrentImageContext();
}
UIGraphicsEndImageContext(); 

Then save to the photos library with this:

UIImageWriteToSavedPhotosAlbum(_myView, ,

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜