SabBar 1.0.0

SabBar 1.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Nov 2016
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by MacTeo.



SabBar 1.0.0

SabBar

Drop-in UITabBarController subclass that shows a sidebar with tabs based on trait collections.

split-view

Description

SabBar aims to let you easily choose to show a sidebar with the same functionality of a UITabBar inside of your application, based on trait collections. To do so we’ve created a UITabBarController subclass called SabBarController that does most of the work. We’ve also added few options to customize the appearance of those sidebar (width, tab height, top navigation bar, header view, ecc).

iPhone-landscape

Features

  • [x] Ready to use, just swap a class.
  • [x] iPad and iPhone compatible.
  • [x] Single drop-in file.
  • [x] Customize sidebar appearance based on trait collections.
  • [x] No dependancies.
  • [x] Tests.
  • [x] Supports accessibility.
  • [x] Optional header view.
  • [x] Work well with and without navigation bars.
  • [x] Automatically grabs customizations from the UITabBar.
  • [x] Full documentation.
  • [ ] Support top, bottom and centered sidebar cells.
  • [ ] Support sidebar translucency.

Requirements

  • iOS 8.0+
  • Xcode 8.0+

Documentation

Online documentation is available curtesy of CocoaDocs. You can also navigate it offline downloading the source code and looking inside the docs folder.

Usage

Import SabBar module into your Swift class

import SabBar

or if you are writing in Objective-C

#import <SabBar/SabBar-Swift.h>

Keep in mind the you have to let the project generate the Bridging Header otherwise the integration may fail.

Just replace any UITabBarController instance with a SabBarController one directly on Storyboards or programmatically.

custom-class

🎉

Sample project

In the Sample folder you can find a sample project with few lines of code in the AppDelegate class for a jumpstart.

Unfortunately you cannot create a subclass written on Objective-C of a Swift class, so you can use SabBar in an Objective-C project, but if you need to subclass the SubBarController you are forced to do it in Swift.

Installation

Manually as a Framework

Add the SabBar Xcode project to your own. Then add the SabBar framework to the embedded binaries of your app’s target.

Manually as source file

Just drag & drop the SabBar.swift source file from the Sources folder in your Xcode project.

Issues and bugs

Feel free to open an issue reporting a problem or requesting a new feature.

Acknowledgements

License

SabBar is released under the MIT license. See LICENSE for details.