SimpleTabBarAnimations
Add animations to your tab bar in a simple manner.
Requirements
- iOS 12.0+
- Swift 5
Instalation
SimpleTabBarAnimations is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SimpleTabBarAnimations'
Usage Example
- Make sure you have set a tint color to your tab bar.
tabBar.barTintColor = .white
- Import SimpleTabBarAnimation and conform your UITabBarController to it.
import SimpleTabBarAnimation
- Override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) and use the provided functionality in it.
extension TabBarVC: SimpleTabBarAnimation {
override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
playAnimation(type: .bounce, for: item)
}
}
License
SimpleTabBarAnimations is available under the MIT license. See the LICENSE file for more info.