Take a picture in iOS without UIImagePicker and without preview it

后端 未结 4 1275
梦毁少年i
梦毁少年i 2020-12-05 22:25

Do you know any way / method to take a photo in iOS and saving it to camera Roll only with a simple button pressure without showing any preview?

I a

4条回答
  •  执念已碎
    2020-12-05 22:46

    Assuming you want a point-and-shoot method, you can create an AVSession and just call the UIImageWriteToSavedPhotosAlbum method. Here is a link that goes into that exact process: http://www.musicalgeometry.com/?p=1297

    It's also worth noting that your users need to have given the app access to their camera roll or you may experience issues saving the images.

提交回复
热议问题