[問題] picker view的外觀
我的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
請問要怎樣才能把那灰色的背景顏色拿掉?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.66.243.96 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1601285451.A.066.html
推
09/29 00:38,
4年前
, 1F
09/29 00:38, 1F
→
09/29 00:39,
4年前
, 2F
09/29 00:39, 2F
→
09/29 00:39,
4年前
, 3F
09/29 00:39, 3F
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章