Setting Corner Radius on UIImageView not working

前端 未结 11 1871
心在旅途
心在旅途 2020-12-22 16:15

I\'m at a bit of a loss. I\'ve used the layer property of UIView to round the corners of multiple elements in my app. However, this one UIImageView is simply not complying.

11条回答
  •  礼貌的吻别
    2020-12-22 17:17

    Try this below piece of code

    cell.previewImage.layer.cornerRadius = 20;
    cell.previewImage.clipsToBounds = YES;
    

提交回复
热议问题