奇怪......文档中的简单内容似乎与Swift无关。见下面的代码。使用Swift时究竟是什么“SDWebImageRefreshCached”
self.profileImageView.sd_setImageWithURL(profileImageUrl, placeholderImage: UIImage(named: "default_profile_image"), options: SDWebImageRefreshCached)
答案 0 :(得分:7)
在Swift中,枚举略有不同。
您可能会寻找SDWebImageOptions.RefreshCached
或.RefreshCached
。
您的代码行将是:
self.profileImageView.sd_setImageWithURL(profileImageUrl, placeholderImage: UIImage(named: "default_profile_image"), options: .RefreshCached)