SplitTabBar

1.0.4

UISplitViewController and UITabBarController in sync
twodayslate/SplitTabBar

What's New

Version 1.0.4

2020-04-22T22:50:14Z
  • Bug fixes

SplitTabBar

A UISplitViewController combined with a UITabBarController in sync

macOS ScreenshotiPad Screenshot

Usage

import SplitTabBar

let splitTabBar = SplitTabBarViewController(viewControllers: [/*view controllers here*/])

The navigatable view controllers are controlled via the tab bar detail view controller. You can modify them like so:

splitTabBar.setViewControllers([/*your new view controllers */])
// or
splitTabBar.detailTabBar.viewControllers = [/*your new view controllers */]

If you want the UITabBarController tabs to always be present you can enable them via

splitTabBar.shouldHideTabBar = false

You can see an example of showing both the UISplitViewController navigation and the UITabBarController tabs in the macOS screenshots above.

By default the SplitTabBarViewController will hide the UISplitViewController and just display the UITabBarController when its traitCollection horizontalSizeClass is compact. You can change this behavior using the following properties:

splitTabBar.compactPreferredDisplayMode = UISplitViewController.DisplayMode.primaryHidden
splitTabBar.regularPreferredDisplayMode = UISplitViewController.DisplayMode.automatic

Description

  • Swift Tools 5.2.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sat Dec 14 2024 12:26:01 GMT-1000 (Hawaii-Aleutian Standard Time)