Skip to content

franklinsch/iOSScrollingTabBarAnimation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScrollingTabBarControllerAnimation

A horizontal scrolling animation for iOS TabBarControllers. Works with any number of TabBarItems, and any orientation.

Blog post

Demo

With three TabBarItems:

"ScrollingTabBarControllerAnimation with three tabs"

Usage

  • Import ScrollingTabBarUtils.swift to your Xcode project

  • Set your UITabBarController's delegate to ScrollingTabBarControllerDelegate

    Ex:

    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.

About

A horizontal scrolling animation for Tab Bar Controllers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages