Swift Package Index


A useful protocol and its extension when you make custom TabBarViewController


  • The latest stable release is 1.1.0. Released 3 years ago.
  • The last commit to master was 3 years ago.

Swift Version Compatibility

  • 1.1.0 and master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 1.1.0 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

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.