iOSScrollingTabBarAnimation
iOSScrollingTabBarAnimation copied to clipboard
A horizontal scrolling animation for Tab Bar Controllers
ScrollingTabBarControllerAnimation
A horizontal scrolling animation for iOS TabBarControllers. Works with any number of TabBarItems, and any orientation.
Demo
With three TabBarItems:

Usage
-
Import
ScrollingTabBarUtils.swiftto your Xcode project -
Set your
UITabBarController'sdelegatetoScrollingTabBarControllerDelegateEx:
class YourTabBarController: UITabBarController {
let delegate = ScrollingTabBarControllerDelegate() override func viewDidLoad() { super.viewDidLoad() self.delegate = delegate }}
-
That's it!
Customization
The animation is provided by a call to UIView.animateWithDuration(_:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:), and the transition duration should be modified in transitionDuration(_:).
Feel free to modify these parameters.
License
MIT, see LICENSE for details.