Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的应用程序中,我将允许用户从图库中挑选照片(或用相机拍摄照片/视频)。
我需要将路径保存在数据库中以便以后检索,但我不明白我该怎么做。
** 编辑 **
我没有解决这个问题,所以现在我将图像保存在本地,并将本地路径保存在数据库中。
我从未使用过UIImagePickerControllerReferenceURL,但我假设您将其用作任何其他 URL:
UIImagePickerControllerReferenceURL
[UIImage imageWithData:[NSData dataWithContentsOfURL:url]];