How to make a circular UIView

前端 未结 7 1513
伪装坚强ぢ
伪装坚强ぢ 2020-11-28 04:05

I want to make a UIView or UIImageView that is a circle. Or a circle that i can change the size of using a slider, and the color of with a pickerview.

7条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 04:17

    // For those looking to round the corners of an image view
    imageView.layer.cornerRadius = imageView.bounds.size.width/2;
    imageView.layer.masksToBounds = YES;
    

提交回复
热议问题