I have a subclass of UITableViewCell
with the UIImage
as property.
I want to draw an image in drawRect and be effective because it is a table cell.
I know how to draw an image like this:
-(void)drawRect:(CGRect)aRect { CGRect rect = self.bounds; [self.image drawInRect:rect]; }
But how can I draw an image with rounded corners and remain effective?
By the way, I do not want to use UIImageView
, and then set the radius of the corner of the layer, because it throws harm to performance.
source share