Ramotion / animated-tab-bar

:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion
https://www.ramotion.com/animated-tab-bar-ios-app-development-ui-library/
MIT License
11.12k stars 1.33k forks source link

iOS 16 crashes #305

Closed astrokin closed 1 year ago

astrokin commented 2 years ago

Inconsistency in UITabBar items and view controllers detected. 
No view controller matches the UITabBarItem '<RAMAnimatedTabBarController.RAMAnimatedTabBarItem: 0x155142b80> title='' selected'.
resand commented 1 year ago

How is your implementation? With code, SB or XIB?

The same thing happened to me but with the code implementation and embedding a UINavigationController.

astrokin commented 1 year ago

this happened to me because i've wrapped into UINavigationController my each tab item after assign tabBarItem. So if you are using UINavigationController you must set RAMAnimatedTabBarItem property to exactly each UINavigationController you are passing into func setViewControllers(_ viewControllers: [UIViewController]?, animated: Bool)

resand commented 1 year ago

You need to add the Bar Item tab like in the example here:

https://github.com/Ramotion/animated-tab-bar/issues/86

It's in an older version of Swift, but it's the idea and it works perfectly.