Swift设置UIImageView为圆形

不管是oc还是swift这种方式都可以。

let userPicUIImageView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))

userPic.layer.cornerRadius = userPic.frame.size.width / 2

userPic.layer.masksToBounds = true

posted @ 2021-02-20 17:41  jiduoduo  阅读(342)  评论(0编辑  收藏  举报