fix: profile segmented control cannot adapt UI appearance issue

This commit is contained in:
CMK 2022-07-15 03:31:19 +08:00
parent 742c02ce6a
commit 5365fabe01
1 changed files with 2 additions and 1 deletions

View File

@ -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)