Save My app image to gallery iOS swift || Save Document directory image into Gallery iOS swift

Solution:

In below function MyImage is an image that i want to save it into my gallery.

    UIImageWriteToSavedPhotosAlbum(MyImage, self, #selector(image(_:didFinishSavingWithError:contextInfo:)), nil)


  //MARK: - Add image to Library

  @objc func image(_ image: UIImage, didFinishSavingWithError error: Error?, contextInfo: UnsafeRawPointer) {

    

  }

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift