How do I get a thumbnail or saveable path from UIImagePickerController to use for a UIImageView?

前端 未结 4 1612
被撕碎了的回忆
被撕碎了的回忆 2021-02-03 13:15

Could somebody please explain or show some sample code of how I can use get a thumbnail to be put into a UIImageView after the user selects a photo with UIImagePickerController?

4条回答
  •  灰色年华
    2021-02-03 13:30

    Saving the URL can be problematic:

    1. at least in iOS 4.x, the URLs is not guaranteed to be unique. They can be reused if user deletes/add pictures, which is obviously common. So, the URL you kept can point to a different picture in the future!
    2. When the user updates to iOS 5, the URLs are no longer valid. UGH!!! Apple has rewritten Photo Library, with no backward compatibility.

提交回复
热议问题