如何保存图片到iPhone照片库? [英] How to save picture to iPhone photo library?

查看:157
本文介绍了如何保存图片到iPhone照片库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要做什么来保存我的程序生成的图片(可能是从相机,可能没有)到iPhone上的系统照片库。

What do I need to do to save an image my program has generated (possibly from the camera, possibly not) to the system photo library on the iPhone?

推荐答案

您可以使用此功能:

UIImageWriteToSavedPhotosAlbum(UIImage *image, 
                               id completionTarget, 
                               SEL completionSelector, 
                               void *contextInfo);

您只需要 completionTarget completionSelector contextInfo ,如果您希望在 UIImage 完成保存时收到通知,否则您可以传入 nil

You only need completionTarget, completionSelector and contextInfo if you want to be notified when the UIImage is done saving, otherwise you can pass in nil.

请参阅 UIImageWriteToSavedPhotosAlbum() 的官方文档。

See the official documentation for UIImageWriteToSavedPhotosAlbum().

这篇关于如何保存图片到iPhone照片库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆