UIImage Saving image with file name on the iPhone

后端 未结 3 1201
迷失自我
迷失自我 2020-11-28 13:50

How can I save an image (like using UIImageWriteToSavedPhotosAlbum() method) with a filename of my choice to the private/var folder?

3条回答
  •  無奈伤痛
    2020-11-28 14:15

    UIImageWriteToSavedPhotosAlbum() is only used for saving to the photos camera roll. To save to a custom folder, you need to convert the UIImage into NSData with UIImageJPEGRepresentation() or UIImagePNGRepresentation(), then save this NSData to anywhere you like.

提交回复
热议问题