【发布时间】:2019-02-28 16:07:08
【问题描述】:
在 Swift 4.2 中使用 SDWebimage 在单元格中设置图像时,编译器会抛出以下警告。
Swift 编译器警告:
使用“!”这里已弃用,将在未来的版本中删除
let url = NSURL(string: (str_url) as String)
cell.img!.sd_setImage(with: url as URL!, completed: block_image) //--- WARNING ON THIS LINE AT URL!
有什么建议吗?
【问题讨论】:
标签: ios optional compiler-warnings sdwebimage swift4.2