[英]How to display images from Photo gallery on uiwebview ios swift?
Using Photos API(PHImageManager) i am able to get list of photos url and photo object. 使用Photos API(PHImageManager),我可以获取照片URL和照片对象的列表。 When I am trying to use that url in webview , image is not displaying
当我尝试在webview中使用该url时,图像未显示
Consider the following image url which I got from Photos API(PHImageManager) 考虑以下我从Photos API(PHImageManager)获得的图像网址
you just have to take that burl in string and then load that string in webview in viewdidload 您只需要在字符串中获取该burl,然后在viewdidload中的webview中加载该字符串
like 喜欢
urlStr = obj["url"] as! urlStr = obj [“ url”]为! String
串
and then load that url in uiwebview 然后在uiwebview中加载该网址
webview.loadRequest(NSURLRequest(URL: NSURL(string: urlStr)!)) webview.loadRequest(NSURLRequest(URL:NSURL(string:urlStr)!))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.