如何为
我已经尝试过:
但是导航栏会有浅灰色的背景。 编辑 我尝试更改表视图的背景颜色,但好像没有影响。
"EDIT2" 的 HTML 标记。
我也尝试了一个带alpha值的颜色。我可以使背景半透明(见上面的代码行)。但如果我将alpha设为0.0以完全透明,我再次得到浅灰色的背景。
UITableView
中的sections index bar
设置透明背景?我已经尝试过:
tableView.sectionIndexBackgroundColor = .clearColor()
但是导航栏会有浅灰色的背景。 编辑 我尝试更改表视图的背景颜色,但好像没有影响。
tableView.backgroundView = UIView.init()
tableView.backgroundColor = .blackColor() // tried .clearColor() too.
"EDIT2" 的 HTML 标记。
tableView.sectionIndexBackgroundColor = UIColor(white: CGFloat(1.0), alpha: CGFloat(0.5)) // change the alpha and check once
我也尝试了一个带alpha值的颜色。我可以使背景半透明(见上面的代码行)。但如果我将alpha设为0.0以完全透明,我再次得到浅灰色的背景。