fix: profile segmented control cannot adapt UI appearance issue
This commit is contained in:
parent
742c02ce6a
commit
5365fabe01
|
@ -66,7 +66,7 @@ extension ProfilePagingViewController {
|
|||
|
||||
override func viewDidLoad() {
|
||||
// configure style before viewDidLoad
|
||||
settings.style.buttonBarBackgroundColor = ThemeService.shared.currentTheme.value.systemBackgroundColor
|
||||
settings.style.buttonBarBackgroundColor = .red // ThemeService.shared.currentTheme.value.systemBackgroundColor
|
||||
settings.style.buttonBarItemBackgroundColor = .clear
|
||||
settings.style.buttonBarItemsShouldFillAvailableWidth = false // alignment from leading to trailing
|
||||
settings.style.selectedBarHeight = 3
|
||||
|
@ -87,6 +87,7 @@ extension ProfilePagingViewController {
|
|||
.sink { [weak self] theme in
|
||||
guard let self = self else { return }
|
||||
self.settings.style.buttonBarBackgroundColor = theme.systemBackgroundColor
|
||||
self.buttonBarView.backgroundColor = self.settings.style.buttonBarBackgroundColor
|
||||
self.barButtonLayout?.invalidateLayout()
|
||||
}
|
||||
.store(in: &disposeBag)
|
||||
|
|
Loading…
Reference in New Issue