Latest 1.0.0
Homepage https://github.com/macteo/SabBar
License MIT
Platforms ios 8.0, requires ARC
Authors

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

License MIT Version Carthage compatible travis-ci
codecov.io Swift 3 iOS 8+

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

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 0.39.0+ is required to build Marklight.

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

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target "YourTargetName" do
    pod 'SabBar'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate Marklight into your Xcode project using Carthage, specify it in your Cartfile:

github "macteo/SabBar"

Run carthage update --platform iOS to build the framework and drag the built SabBar.framework into your Xcode project.

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.

Latest podspec

{
    "name": "SabBar",
    "version": "1.0.0",
    "summary": "Drop-in UITabBarController subclass that shows a sidebar with tabs based on trait collections.",
    "description": "`SabBarController` is a subclass of `UITabBarController` that adds the optionnto show a sidebar with tabs instead of the classic `UITabBar` based on traitncollections.nn![iPhone-landscape](https://raw.githubusercontent.com/macteo/SabBar/master/Assets/Readme/iPhone-landscape.png)nnIn order to use it, just instantiate it instead of the standardn`UITabBarController` programmatically or within Storyboards.nn![custom-class](https://raw.githubusercontent.com/macteo/SabBar/master/Assets/Readme/custom-class.jpg)",
    "homepage": "https://github.com/macteo/SabBar",
    "license": "MIT",
    "authors": {
        "Matteo Gavagnin": "[email protected]"
    },
    "social_media_url": "https://twitter.com/@macteo",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/macteo/SabBar.git",
        "tag": "v1.0.0"
    },
    "source_files": "Sources/**/*.{swift}",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This