Guest User

Untitled

a guest
Feb 12th, 2020
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.58 KB | None | 0 0
  1. imageLoader.obtainImageWithPath(imagePath: AVATAR_URL + topChat.image) { (image) in
  2.             // Before assigning the image, check whether the current cell is visible
  3.             if let updateCell = tableView.cellForRow(at: indexPath) {
  4.                 updateCell.imageView?.image = image
  5.                 if let frameWidth = updateCell.imageView?.frame.width {
  6.                     updateCell.imageView?.layer.cornerRadius = frameWidth / 2.0
  7.                     updateCell.imageView?.clipsToBounds = true
  8.                 }
  9.                 updateCell.setNeedsLayout()
  10.         }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment