我在我的swift 3.0.1
项目中使用SDWebImage
xcode 8.1
。 我能够从远程URL下载图像,并在tableview
的动态cell
的图像视图中显示。TableView中的SDWebImage向上滚动
当我在tableview
中向上滚动时,会出现问题,图像缩小。
我在我的swift 3.0.1
项目中使用SDWebImage
xcode 8.1
。 我能够从远程URL下载图像,并在tableview
的动态cell
的图像视图中显示。TableView中的SDWebImage向上滚动
当我在tableview
中向上滚动时,会出现问题,图像缩小。
我用这个代码和它为我工作。
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cellId:String = "cellid"
let cell = tableView.dequeueReusableCell(withIdentifier: cellId, for: indexPath) as! customcell
let strUrlProfilepic = your image url path
self.yourImageView.af_setImage(withURL: strUrlProfilepic, placeholderImage: UIImage(named: "PlaceholderImage.jpeg"))
return cell
}
我使用了上面的代码.. self.yourImageView.af_setImage(withURL:strUrlProfilepic,placeholderImage:UIImage(named:“PlaceholderImage.jpeg”))。现在正在工作。 – Rupesh
如果我的回答对你有帮助,则接受我的回答。谢谢 –
你能分享一下你的代码吗?一块代码将是非常有用的 –