Xlpagertabstrip: Selected bar tab color not changing

Created on 13 Sep 2018  路  4Comments  路  Source: xmartlabs/XLPagerTabStrip

I am having a trouble changing selected bar color.
I try to change the tab color as the documentation says.
settings.style.selectedBarBackgroundColor = .yellow
But my selected tab underline color still being black.
Could u please fix that issue?

Most helpful comment

I found a solution :
put all stylings before super.viewDidLoad()

like this :

override func viewDidLoad() {
        settings.style.selectedBarHeight = 3.0
        settings.style.buttonBarBackgroundColor = .white
        settings.style.buttonBarItemBackgroundColor = .white
        settings.style.buttonBarItemTitleColor = .red
        settings.style.selectedBarBackgroundColor = .red
        super.viewDidLoad()
}

All 4 comments

I found a solution :
put all stylings before super.viewDidLoad()

like this :

override func viewDidLoad() {
        settings.style.selectedBarHeight = 3.0
        settings.style.buttonBarBackgroundColor = .white
        settings.style.buttonBarItemBackgroundColor = .white
        settings.style.buttonBarItemTitleColor = .red
        settings.style.selectedBarBackgroundColor = .red
        super.viewDidLoad()
}

@mehdico Thanks! That works for me

@mehdico Thanks! That help me too

buttonBarView.selectedBar.backgroundColor = UIColor.yellow
Was this page helpful?
0 / 5 - 0 ratings

Related issues

NikhilGangurde picture NikhilGangurde  路  4Comments

emrecanozturk picture emrecanozturk  路  5Comments

dkononenko picture dkononenko  路  4Comments

unittesting0 picture unittesting0  路  3Comments

bishalg picture bishalg  路  5Comments