My code works for the most part.
Create a custom cell, and add an image view (with an IBOutlet
), sized and positioned however you want (the outlet is "iv" in my example below). Put the code to make image view round in the awakeFromNib
method (assuming your cell is created in a nib or storyboard).
-(void)awakeFromNib {
self.iv.layer.cornerRadius = self.iv.frame.size.width / 2.0;
self.iv.layer.borderWidth = 3.0;
self.iv.layer.borderColor = [UIColor colorWithRed:157.0/255.0 green:34.0/255.0 blue:53.0/255.0 alpha:1.0].CGColor;
self.iv.clipsToBounds = YES;
}