简体   繁体   English

从 photoLibrary 获取图像并显示在 tableview 单元格上?

[英]get image from photoLibrary and display on tableview Cell?

I want to get image from photo library and show image on tableview cell.我想从照片库中获取图像并在 tableview 单元格上显示图像。

yes, I know, we can use let pickedImageFromGallery = info[UIImagePickerController.InfoKey.editedImage] as.是的,我知道,我们可以使用 let PickImageFromGallery = info[UIImagePickerController.InfoKey.editedImage] 作为。 UIImage imagePicker:dismiss(animated, true: completion. nil) in didFinishPickingMediaWithInfo method. UIImage imagePicker:dismiss(animated, true: completion.nil) 在 didFinishPickingMediaWithInfo 方法中。

but I want to get the image from photo library as String and display on cell.但我想从照片库中获取图像作为字符串并显示在单元格上。

how can I do that?我怎样才能做到这一点?

First, you need to convert to binary data: NSData or Data首先,您需要转换为二进制数据:NSData 或 Data

Second, convert to string二、转为字符串

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从Photolibrary图像获取拇指图像? - How to get thumb image from Photolibrary image? 从光库图像获取正确的图像方向属性 - Get correct image orientation property from photolibrary image 想要从仅具有图像名称的api将图像显示到tableview单元格中 - want to display image into tableview cell from an api with only image name 从 photoLibrary 获取图像的元数据 - Getting metadata of image from photoLibrary 如何从 URL 加载图像并将其显示在 tableView 单元格中 (Swift 3) - How to load an image from URL and display it in tableView cell (Swift 3) iOS:从照相馆打开图像 - iOS: opening image from photolibrary 选择该单元格后,如何将其从图像库上传到特定的collectionview单元格? - How to upload image from photolibrary to specific collectionview cell when that cell is selected? 如何从PFObject获取String并将其显示在tableView单元格中? - How to get String from PFObject and display it into tableView cell? 目标C-使用tableview将选择的图像从UIImageView传递/检索到第二个VC,以便单元格可以显示该图像 - Objective C - Passing/retrieving selected image from UIImageView to second VC with tableview so cell can display that image 从photolibrary / album中获取图像不适用于ipad - Fetching image from photolibrary/album is not working on ipad
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM