[英]How to make an UIView into circle shape in swift 4.2?
UIView的width(40)和height(40)相等。
我嘗試了這些,但它們對我沒有用:
countView?.clipsToBounds = true
self.countView?.layer.cornerRadius = min((countView?.frame.size.width)!, (countView?.frame.size.height)!)/2
並且
self.countView.layer.cornerRadius = (countView.frame.size.width)/2
謝謝
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.