- 加载本地资源
let path = Bundle.main.path(forResource:"123", ofType:"gif")
let url = URL(fileURLWithPath: path!)
let provider = LocalFileImageDataProvider(fileURL: url)
imageView.kf.setImage(with: provider)
2.加载网络资源
imageView.kf.setImage(with: URL(string: url))
网友评论