Skip to content

kumapo/ScrollableTabs

Repository files navigation

ScrollableTabs

CI Status Version License Platform

Screenshots

Screenshots_1

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

ScrollableTabs is available through both CocoaPods and Carthage.

CocoaPods

To integrate it into your project using CocoaPods, specify it in your Podfile:

pod "ScrollableTabs"

Carthage

Specify it in your Cartfile:

github "kumapo/ScrollableTabs"

Usage

Container ViewController

import ScrollableTabs

class ViewController: UIViewController, ScrollableTabBarController {
    
    //Protocol Methods
    @IBOutlet weak var scrollBar: ScrollableTabBar!
    weak var delegate: ScrollableTabBarControllerDelegate?
    var isTransitioningFromViewController: Bool = false

    override func viewDidLoad() {
        super.viewDidLoad()
        // Initialize childViewController1 and childViewController2
        // .. 
        setViewControllers([childViewController1, childViewController2], animated: false)
        selectedViewController = childViewController1

Content ViewController

class ChildViewController: UIViewController, ScrollableTabBarContentableController {
    lazy var item: UIBarButtonItem = {
    // Initialize UIBarButtonItem
    // .. 
    }()

Author

kumapo, kumapo@users.noreply.github.com

License

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