Skip to content

innocarpe/TabNavigable

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

TabNavigable

Swift CocoaPods Build Status Codecov

Example

class CustomTabBarViewController: UIViewController, TabNavigable {
  var containerView: UIView!
  var viewControllers: [UIViewController]! = []
  
  override func viewDidLoad() {
    super.viewDidLoad()
    initViewControllers()
  }
  
  private func initViewControllers() {
    addViewController()
    addViewController()
    addViewController()
    
    changeActiveViewController(index: 0)
  }
  
  private func addViewController() {
    let viewController = YourTabViewController()
    viewControllers.append(viewController)
  }
  
  func tabButtonDidTap(index: Int) {
    changeActiveViewController(index: index)
  }
}

Installation

TabNavigable is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "TabNavigable"

Contribution

For your convenience, execute the line below to generate xcodeproj.

$ swift package generate-xcodeproj

Author

Wooseong Kim, innocarpe@gmail.com

License

TabNavigable is available under the MIT license. See the LICENSE file for more info.

About

A useful protocol and its extension when you make custom TabBarViewController

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published