0
我嘗試將headerView的邊框顏色更改爲衝浪綠色,但似乎我的代碼不起作用。我試過是這樣的:Swift:如何在tableViewController中以編程方式更改tableHeaderView的邊框顏色
tableView.tableHeaderView?.layer.borderColor = UIColor(red: 105.0/255.0, green: 215.0/255.0, blue: 189.0/255.0, alpha: 1.0).CGColor
tableView.tableHeaderView?.layer.masksToBounds = true
然而,標頭的邊框依然是這樣的:
Here is the Image(對不起,我沒有足夠的信譽發表圖片)
正如你所看到的,邊框仍然是黑色/深藍色。
任何幫助將不勝感激!提前致謝!