ios - SDWebImage 不适用于 Firebase 存储
问题描述
我已经阅读了很多关于 SDWebImage 和 Firebase 问题的帖子,但似乎没有一个能解决我的问题。我正在尝试在我的 collectioniionView 单元格中显示来自 Firebase 存储的图像:
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! BildeKatCell
let someUrl = URL(string: "url to one random firebase storage image")
cell.imageView.sd_setImage(with: someUrl, completed: nil)
return cell
}
我已经用我最终想要使用的所有图像中的 url 创建了一个数组,但是即使使用硬编码的 url,我也无法在我的单元格中显示图像。我已经尝试了所有不同的 sd_setimage 方法,我还尝试在普通 viewController 中使用单个 imageView 执行完全相同的操作,但我仍然一无所获。不明白我错过了什么。
解决方案
推荐阅读
- r - 读取具有 JSON 格式数据的 csv 文件的单个单元格,并使用 R 将其转换为数据框(列)
- weblogic - 更改 WebLogic 管理员门户 URL
- python - Discord.py 在命令方法上使用多个权限检查装饰器
- javascript - 如何从我的 JavaScript 应用程序调用 API
- java - 正确忽略 InterruptedException
- haxe - Haxe 4.1.5 保存数据?
- c++ - LoadLibrary Dll 注入器获取路径输入并“加扰”
- ruby-on-rails - 将空字符串转换为 int 的更短方法,然后进行钳位
- javascript - 网站按钮点击在移动设备上不起作用
- sql-server - 如何从另一台服务器中的 Springboot 应用程序从一台服务器中连接到 SQL Server 数据库?