首页 > 解决方案 > 如何将实时图像加载到 UIImageView

问题描述

我正在尝试将实时图像加载到 aUImageView中,但它被加载为静态图像。

这是我的代码:

if let stringLocal = Bundle.main.path(forResource: "Image_from _iOS", ofType: "jpg") {
    self.displayImageView.image = UIImage(named: stringLocal)
}

有什么建议么?

标签: iosswiftlive-wallpaper

解决方案


实时照片是 PHLivePhoto,而不是 UIImage。所以它在 PHLivePhotoView 中实时显示,而不是在 UIImageView 中。


推荐阅读