TabNavigable

1.1.0

A useful protocol and its extension when you make custom TabBarViewController
innocarpe/TabNavigable

What's New

1.1.0

2017-09-23T06:56:52Z

Notice

This version includes breaking change.

Changes

  • Change Pod name to TabNavigable
  • Migrate to Swift 4.0

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.

Description

  • Swift Tools 4.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Wed Mar 13 2024 12:18:12 GMT-0900 (Hawaii-Aleutian Daylight Time)