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

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift