我在项目中使用了xlpagertabbarstrip
,为子视图控制器指定了标题,标题下有一行显示为黑色。我已更改其颜色,但仍在标题下显示黑色下划线。我们如何改变那条线的颜色?
更改颜色的代码如lib
settings.style.buttonBarBackgroundColor = #colorLiteral(red: 0.09759091236, green: 0.5779017098, blue: 1, alpha: 1)
settings.style.buttonBarItemBackgroundColor = .white
settings.style.selectedBarBackgroundColor = #colorLiteral(red: 0.09759091236, green: 0.5779017098, blue: 1, alpha: 1)
settings.style.buttonBarItemFont = .boldSystemFont(ofSize: 16)
settings.style.selectedBarHeight = 1.5
settings.style.buttonBarMinimumLineSpacing = 0
settings.style.buttonBarItemTitleColor = #colorLiteral(red: 0.09759091236, green: 0.5779017098, blue: 1, alpha: 1)
settings.style.buttonBarItemsShouldFillAvailiableWidth = true
settings.style.buttonBarLeftContentInset = 0
settings.style.buttonBarRightContentInset = 0
changeCurrentIndexProgressive = { [weak self] (oldCell: ButtonBarViewCell?, newCell: ButtonBarViewCell?, progressPercentage: CGFloat, changeCurrentIndex: Bool, animated: Bool) -> Void in
guard changeCurrentIndex == true else { return }
oldCell?.label.textColor = #colorLiteral(red: 0.6666666865, green: 0.6666666865, blue: 0.6666666865, alpha: 1)
newCell?.label.textColor = self?.purpleInspireColor
}
当我运行该应用程序时,它显示为黑色。