append pngdata to file rather than overwrite

Viewed 18

i want data to append to file rather than overwrite in ios while saving file.

How can I do that?

 let url = playgroundSharedDataDirectory.appendingPathComponent("\(photo)")
            print(url)
              try! img!.pngData()?.write(to: url, options: .atomic)
0 Answers
Related