[英]Saving in a DB the path of a photo chosen from the gallery
In my app, I would allow the user to pick a photo from the gallery (or snap a photo/video with the camera). 在我的应用中,我将允许用户从图库中挑选照片(或使用相机拍摄照片/录像)。
I need to save the path in a db to retrieve it later, but I don't understand how I can do it. 我需要将路径保存在数据库中以便以后检索,但是我不知道该怎么做。
** EDIT ** **编辑**
I didnt' resolve this issue, so now I save the images locally and I save the local path in the db. 我没有解决此问题,所以现在我将图像保存在本地,并将本地路径保存在数据库中。
我从未使用过UIImagePickerControllerReferenceURL
,但我假设您将其用作任何其他URL:
[UIImage imageWithData:[NSData dataWithContentsOfURL:url]];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.