Coder Social home page Coder Social logo

bctabbarcontroller's Introduction

BCTabBarController

BCTabBarController is a Tweetie-style tab bar for iPhone. See below for screenshots.

Why?

There are several problems with using the standard UITabBarController including:

  • It is too tall, especially in landscape mode
  • The height doesn't match the UIToolbar
  • It cannot be customized without using private APIs
  • It has labels. Sometimes you don't need labels.

BCTabBarController is completely written from scratch using public APIs to fix all of these problems and behaves almost identically to a normal UITabBarController.

Features

  • A cool little arrow that slides around to indicate the current tab
  • Support for all orientations
  • Same height as a standard UIToolbar

Usage

  • Add BCTabBarController.xcodeproj to your project by dragging it into the Groups & Files sidebar.
  • Select the added project file in the sidebar and then check the box next to libBCTabBarController.a
  • Select your project's target and right-click and choose "Get Info"
  • Click the + icon underneath Direct Dependencies and add the BCTabBarController target
  • libBCTabBarController.a should already be in the list of Linked Libraries
  • Drag BCTabBarController.bundle into your project's resources
  • If you haven't already, add the QuartzCore and Core Graphics frameworks to your project
  • Define the method - (NSString *)iconImageName in each view controller that you add to the tab bar. It should return the filename of the grey tab icon (see creation steps below)
  • See the example target for usage

Creating icons

Unlike UITabBarController, the tab bar icons in BCTabBars are have two pre-rendered states (four if you count the retina versions). You can use the provided tab.psd file to create those files.

  • Replace the layer masks in the PSD with the silhouette of the icon you wish to create
  • Save the grey layer as name.png and the blue layer as name-selected.png and add them to your project.

Screenshots

Acknowledgements

This controller wouldn't be possible without the original innovative design of Tweetie by Loren Brichter (atebits).

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.