简体   繁体   English

如何在uiwebview ios swift上显示照片库中的图像?

[英]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.

相关问题 如何在iOS 8 Swift中从照片库中提取多个图像 - How to pickup multiple images from photo gallery in iOS 8 Swift 显示来自iOS画廊的图像 - display images from iOS gallery 如何在iOS中快速显示多个标记的标记标题而不用点击它,就像iOS中照片库中的位置一样 - how to display marker title for multiple markers without tapping on it in iOS swift like places in photo gallery in iOS 从url下载图像并存储到Swift中的照片库中 - Download Images from url and store into Photo Gallery in Swift 如何从iOS照片库中获取图像并将其显示在UIWebView中 - How do I get an image from the iOS photo library and display it in UIWebView 如何在CollectionView中显示照片库或相机中的选定图像? 图库视图 - How can I display selected images from the Photo Library or Camera in a CollectionView? Gallery view 如何在Swift / iOS中创建侧面刷图库? - How to create a side swiping photo gallery in Swift/iOS? 如何显示照片库中刚选择的图像? - How to display images that in photo gallery that were just selected? 如何快速刷新图库? - How to refresh photo gallery in swift? 如何上传从照片库图像或相机中的WebView中的iOS - How to upload image from Photo Gallery or Camera in WebView in iOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM