TabBarPageController

0.2.1

A container view controller for iOS that manages navigation between pages of content using a tab bar.
conmulligan/TabBarPageController

What's New

0.2.1

2022-03-17T22:31:25Z

Changed:

  • Improved documentation.

TabBarPageController

Swift Version License Platform

TabBarPageController is a container view controller that manages navigation between pages of content. Each page is represented by a child view controller embedded in a UIPageViewController instance, allowing users to navigate between pages by either selecting tab bar items or swiping left and right.

Usage

Create a TabBarPageController instance and add view controllers to it:

let tabBarController = TabBarPageController()
tabBarController.addViewController(viewController)

Show a specific view controller:

tabBarController.showViewController(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's not a drop-in replacement and includes 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.

Example

An example project is included under the /Example directory.

Requirements

Requires iOS 13.0 or greater.

Installation

TabBarPageController can be installed using the following methods:

Swift Package Manager (Recommended)

TabBarPageController is available through the Swift Package Manager. To use TabBarPageController with SPM, add https://github.com/conmulligan/TabBarPageController.git as a dependency.

CocoaPods

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

pod 'TabBarPageController'

Manual Installation

You can also just copy the TabBarPageController.swift file into your project.

License

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

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Oct 21 2024 14:07:50 GMT-0900 (Hawaii-Aleutian Daylight Time)