看板 MacDev 關於我們 聯絡資訊
我的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
nobody1: 在執行程式時 打開STORYBOARD 找找一個 123.193.180.27 09/29 00:38
nobody1: 按鈕 view debug hierachy 可以看到你的 123.193.180.27 09/29 00:39
nobody1: 灰色是在那一層那一個物件上 123.193.180.27 09/29 00:39