Prevent image bleed past layer border.
1. Create UIVIew with a UIImageView inside. Constraints on the UIImageView should be -1 from all side of the UIVIew.
2. Add border properties to the UIView.
cell.avatarContainerView.layer.borderWidth = 2.0; cell.avatarContainerView.layer.borderColor = [UIColoe whiteColor].CGColor; cell.avatarContainerView.layer.cornerRadius = cell.avatarContainerView.bounds.size.height / 2;
Optional:
Add .layer.shouldRasterize = YES; for performance gains.