iOS: Image view aspect fit with corner radius
问题 I want to set corner radius with content mode as aspect fit using following code: cell.imgvAlbum.contentMode = UIViewContentModeScaleAspectFit; cell.imgvAlbum.clipsToBounds = YES; cell.imgvAlbum.layer.cornerRadius = 5.0f; but i am getting output only for content mode as aspect fit. I have also tried for: cell.imgvAlbum.layer.masksToBounds = YES; What to do for corner radius? Please suggest me some solution. Thanks in advance. 回答1: Use below method to get a Rounded corner image with the