Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imageLoader.obtainImageWithPath(imagePath: AVATAR_URL + topChat.image) { (image) in
- // Before assigning the image, check whether the current cell is visible
- if let updateCell = tableView.cellForRow(at: indexPath) {
- updateCell.imageView?.image = image
- if let frameWidth = updateCell.imageView?.frame.width {
- updateCell.imageView?.layer.cornerRadius = frameWidth / 2.0
- updateCell.imageView?.clipsToBounds = true
- }
- updateCell.setNeedsLayout()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment