我有一个UITableView默认的单元格样式。(设置为.subtitle样式)我想将其设为UIImageView圆形。
cell.imageView.layer.borderWidth = 1
cell.imageView.layer.masksToBounds = false
cell.imageView.layer.borderColor = UIColor.white.cgColor
cell.imageView.layer.cornerRadius = profileImageView.frame.size.width/2
cell.imageView.clipsToBounds = true
Run Code Online (Sandbox Code Playgroud)
在这种情况下这是行不通的!