TabBarPageController
is a container view controller that manages navigation between pages of content. Each page is managed by a child view controller embedded in a UIPageViewController
instance, allowing users to navigate between tabs by selecting tab bar items or swiping left and right.
Create a TabBarPageController
instance and add view controllers to it:
let tabBarController = TabBarPageController()
tabBarController.add(viewController)
Show a specific view controller:
tabBarController.show(viewController)
You can configure the appearance of tab bar items by changing the child view controllers' UITabBarItem
values.
Although TabBarPageController
is similar to UITabBarController
it is not a drop-in replacement and has a number of important differences:
TabBarPageController
always hides the tab bar when a child navigation view controller pushes a new view controller. This is to avoid interfering with the navigation controller's back navigation gesture.- Editing and the "more" navigation controller are not supported.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requires iOS 9 or greater.
TabBarPageController
is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'TabBarPageController'
You can also just copy the TabBarPageController.swift
file into your project.
conmulligan, [email protected]
TabBarPageController
is available under the MIT license. See the LICENSE file for more info.