Material icon indicating copy to clipboard operation
Material copied to clipboard

TabBarItems alignment on BottomNavigationController

Open Hamna21 opened this issue 5 years ago • 1 comments

Hello @danieldahan, @OrkhanAlikhanov!

I am facing an issue with BottomNavigationController after updating to latest pod. When switching back to portrait from landscape mode, the alignment of TabBarItems on Tab Bar gets misplaced, all items get gathered on left.

image

Waiting for response! Thank you!

Hamna21 avatar Jan 21 '20 08:01 Hamna21

Fixed this issue by using new TabBar properties for iOS 13.

let appearance = UITabBarAppearance()
            appearance.stackedItemPositioning = .centered
            appearance.stackedLayoutAppearance.normal.titleTextAttributes = normalAttribute
            appearance.stackedLayoutAppearance.selected.titleTextAttributes = selectedAttribute
            tabBar.standardAppearance = appearance

Hamna21 avatar Jan 29 '20 07:01 Hamna21