【问题标题】:Rendering GIF in swift 5.3在 Swift 5.3 中渲染 GIF
【发布时间】:2020-12-14 08:12:13
【问题描述】:

我在 UITableview 中渲染 GIF,但由于渲染 gif,它需要时间(就像我每次上下滚动时它都会卡住一会儿)。渲染gif,我用的是这行代码

UIImage.gifImageWithName("funny")

https://iosdevcenters.blogspot.com/2016/08/load-gif-image-in-swift_22.html

因此,如果有其他解决方案,请向我提出建议。谢谢

【问题讨论】:

  • 尝试在后台线程中加载 gif 图像。这只是一个猜测。

标签: ios xcode swift5


【解决方案1】:

您可以使用kingfisher 并以节省内存的方式渲染 gif。

【讨论】:

    猜你喜欢
    • 2016-03-31
    • 2021-05-13
    • 1970-01-01
    • 2017-03-21
    • 2017-12-22
    • 2018-08-07
    • 1970-01-01
    • 2011-12-16
    • 2021-11-15
    相关资源
    最近更新 更多