gpt4 book ai didi

ios - hanekeswift 从所有 FormatName 中删除图像

转载 作者:行者123 更新时间:2023-11-28 08:48:25 25 4
gpt4 key购买 nike

当我使用 .hnk_setImageFromUrl 扩展函数将图像设置为 UIImageView(缩放)时使用 Haneke Swift,如何从缓存中再次删除它。我试过:

profileImageView.hnk_setImageFromURL(NSURL(string: imageUrl)!)
Shared.imageCache.remove(key: imageUrl!)

检查文件系统并读取它仅从 HanekeGlobals.Cache.OriginalFormatName 中删除图像的代码这仍然会导致在 Auto*aspectfill 缓存中缓存图像

shared-images/auto-160.0x160.0-aspectfill:
-rw-r--r-- 1 user1 staff 123123 9 Jan 13:26 https%3A%2F%2Fapi.example.com%2Fpubapi%2Fusers%2Fuser%2Fpicture`

这是预期的行为吗?

当然,完全清除缓存总是一个好主意与

Shared.imageCache.removeAll()

最佳答案

开发人员告诉我以下内容:

You can do:

Shared.imageCache.remove(key: imageUrl, formatName: profileImageView.hnk_format.name)

Still, I think we probably should have a removeFromAll method.

关于ios - hanekeswift 从所有 FormatName 中删除图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34693740/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com