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.13k stars 1.33k forks source link

Animates two items at the same time #283

Closed asheswook closed 4 years ago

asheswook commented 4 years ago

If I select first item, first and second item animates at the same time in example. Example link is here: https://github.com/0ber/AnimatedTabBar-Pod-Test For this reason, My app development has been disrupted. Swift 5

igork-ramotion commented 4 years ago

@sthyuji Hey, this is not a problem of Animated-tab-bar sources, this is a problem of provided example

to prevent second item animation just remove code in ViewController.swift

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)    
    (tabBarController as! RAMAnimatedTabBarController).setSelectIndex(from: 0, to: 1)
}