[问题] picker view的外观

楼主: sdico (文)   2020-09-28 17:30:49
我的picker view默认被选择的那个row会是灰色的
https://imgur.com/a/FsHPQkW
我想把它变成白色(无特殊样式)
试着修改了viewForRow:forComponent也没有用
let specificView = UIView.init()
specificView.frame = CGRect.init(x: 0, y: 0, width: 130, height: 45)
specificView.backgroundColor = UIColor.white
let specificLable = UILabel.init(frame: CGRect.init(x: 0, y: 0,
width: 130, height: 45))
specificLable.textAlignment = .center
specificLable.text = "aaaa"
specificLable.textColor = UIColor.black
specificView.addSubview(specificLable)
return specificView
请问要怎样才能把那灰色的背景颜色拿掉?

Links booklink

Contact Us: admin [ a t ] ucptt.com