forked from zelo72/mastodon-ios
chore: fix accessibility large content label text missing issue
This commit is contained in:
parent
096ae1ad19
commit
8d78f6586d
|
@ -174,11 +174,12 @@ extension MainTabBarController {
|
||||||
}
|
}
|
||||||
.store(in: &disposeBag)
|
.store(in: &disposeBag)
|
||||||
|
|
||||||
|
// seealso: `ThemeService.apply(theme:)`
|
||||||
let tabs = Tab.allCases
|
let tabs = Tab.allCases
|
||||||
let viewControllers: [UIViewController] = tabs.map { tab in
|
let viewControllers: [UIViewController] = tabs.map { tab in
|
||||||
let viewController = tab.viewController(context: context, coordinator: coordinator)
|
let viewController = tab.viewController(context: context, coordinator: coordinator)
|
||||||
viewController.tabBarItem.tag = tab.tag
|
viewController.tabBarItem.tag = tab.tag
|
||||||
viewController.tabBarItem.title = nil
|
viewController.tabBarItem.title = tab.title // needs for acessiblity large content label
|
||||||
viewController.tabBarItem.image = tab.image.imageWithoutBaseline()
|
viewController.tabBarItem.image = tab.image.imageWithoutBaseline()
|
||||||
viewController.tabBarItem.selectedImage = tab.selectedImage.imageWithoutBaseline()
|
viewController.tabBarItem.selectedImage = tab.selectedImage.imageWithoutBaseline()
|
||||||
viewController.tabBarItem.largeContentSizeImage = tab.largeImage.imageWithoutBaseline()
|
viewController.tabBarItem.largeContentSizeImage = tab.largeImage.imageWithoutBaseline()
|
||||||
|
@ -198,14 +199,6 @@ extension MainTabBarController {
|
||||||
setViewControllers(viewControllers, animated: false)
|
setViewControllers(viewControllers, animated: false)
|
||||||
selectedIndex = 0
|
selectedIndex = 0
|
||||||
|
|
||||||
let tabBarItemAppearance = UITabBarItemAppearance()
|
|
||||||
tabBarItemAppearance.configureWithDefault(for: .stacked)
|
|
||||||
tabBarItemAppearance.normal.iconColor = Asset.Colors.Label.primary.color
|
|
||||||
tabBar.standardAppearance.stackedItemPositioning = .centered
|
|
||||||
tabBar.standardAppearance.stackedLayoutAppearance = tabBarItemAppearance
|
|
||||||
tabBar.standardAppearance.inlineLayoutAppearance = tabBarItemAppearance
|
|
||||||
tabBar.standardAppearance.compactInlineLayoutAppearance = tabBarItemAppearance
|
|
||||||
|
|
||||||
context.apiService.error
|
context.apiService.error
|
||||||
.receive(on: DispatchQueue.main)
|
.receive(on: DispatchQueue.main)
|
||||||
.sink { [weak self] error in
|
.sink { [weak self] error in
|
||||||
|
|
Loading…
Reference in New Issue