I'm trying to do a design a XLPagerTabStrip control where the overall theme changes as the tabs change.
The following is what's getting called when a tab changes
changeCurrentIndexProgressive = { [weak self] (oldCell: ButtonBarViewCell?, newCell: ButtonBarViewCell?, progressPercentage: CGFloat, changeCurrentIndex: Bool, animated: Bool) -> Void in
guard changeCurrentIndex == true else { return }
oldCell?.label.textColor = .black
newCell?.label.textColor = UIColor.red
//Change the navigation bar's color
self?.navigationController?.navigationBar.barTintColor = UIColor.red
//Attempting to change the selected bar color
self?.settings.style.selectedBarBackgroundColor = UIColor.green
}
Changing the navigation controllers color works, but I can't get the the selected bar (or any thing under the settings object) to change from within here?
Is it possible to change the settings once the view has been loaded?