Skip to content

Commit

Permalink
Fixes #977 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
pera authored and mats-claassen committed May 23, 2017
1 parent a653f24 commit 1456406
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/ImageCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,20 @@ public final class ImageCell: Cell<UIImage>, CellType {
super.setup()

accessoryType = .none
editingAccessoryView = .none
let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 44, height: 44))
imageView.contentMode = .scaleAspectFill
imageView.clipsToBounds = true
accessoryView = imageView
editingAccessoryView = imageView
}

public override func update() {
super.update()

selectionStyle = row.isDisabled ? .none : .default
(accessoryView as? UIImageView)?.image = row.value
(editingAccessoryView as? UIImageView)?.image = row.value
}

}

0 comments on commit 1456406

Please sign in to comment.