0
我在我的自定義UITableViewCell中有一個UIView。我想設置取決於UIViews框架的高度角半徑,目前我有以下代碼:UITableViewCell中UIView的角半徑不能在iOS9中工作
override func layoutIfNeeded() {
super.layoutIfNeeded()
subjectColorView.layer.cornerRadius = subjectColorView.frame.size.height/2
}
這工作完全在iOS10但在iOS9不磨圓邊角處都沒有。我在這裏做錯了什麼?最安全的地方在哪裏做這種類型或視圖設置?
你記錄了'subjectColorView'的'frame.size'嗎? – kamwysoc