GithubHelp home page GithubHelp logo

huntit / sabbar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from macteo/sabbar

1.0 2.0 0.0 4.56 MB

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

License: MIT License

Shell 3.84% Swift 89.82% Ruby 2.89% Objective-C 3.44%

sabbar's Introduction

SabBar

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

License MIT Version Carthage compatible travis-ci codecov.io Swift 2 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

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

Requirements

  • iOS 8.0+
  • Xcode 7.1+

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.

sabbar's People

Contributors

macteo avatar huntit avatar

Stargazers

Gurpartap Singh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.