How to save UIImage to file with NSFileManager?

前端 未结 2 1140
灰色年华
灰色年华 2020-12-14 17:37

How I can save UIImage to file with NSFileManager ?

Thank,

2条回答
  •  -上瘾入骨i
    2020-12-14 18:24

    To save it as a file, you'll either need to put it in a plist, or create a png/jpg representation of the image. You can save the UIImage data a little easier with NSCoding.

    See this tutorial for more info: http://www.raywenderlich.com/1914/how-to-save-your-app-data-with-nscoding-and-nsfilemanager

提交回复
热议问题