Latest 0.1.1
Homepage https://github.com/yunuserenguzel/SlidingTabbarController
License MIT
Platforms ios 8.0, requires ARC
Authors

Scrollable SlidingTabbarController for iOS

Are you limited to UITabbar’s item count?
Do you want to impress your customers?

Don’t restrict your app to use side menu when you have too many menu items.
Use SlidingTabbarController to have smart tab bar on your apps.

demo

How to use

Using SlidingTabbarController is easy. Copy SlidingTabbarController.swift into your project.

  • Go to applicationDidFinishLaunchingWithOptions method inside your project’s AppDelegate

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    
    ...
    
    return true
    }
  • Create a SlidingTabbarController instance,

    let slidingTabbarController = SlidingTabbarController()
  • Set the items

    slidingTabbarController.items = [
    SlidingTabbarItem(image: UIImage(named: "alligator")!,
    highlightedImage: UIImage(named: "alligator_filled")!,
    title: "Alligator",
    controller: ViewController(imageName: "alligator_large")),
    SlidingTabbarItem(image: UIImage(named: "bird")!,
    highlightedImage: UIImage(named: "bird_filled")!,
    title: "Bird",
    controller: ViewController(imageName: "bird_large"))
    ]
  • Create a window and make SlidingTabbarController be window’s rootViewController
    window = UIWindow(frame: UIScreen.mainScreen().bounds)
    window!.makeKeyAndVisible()
    window!.rootViewController = slidingTabbarController

    That is it!

What is SlidingTabbarItem?

SlidingTabbarItem consists of three major elements an image, a title and a controller. Image and title are for showing the corresponding button on the tabbar for the controller. Also, there is highlightedImage to indicate which controller is selected and shown on the screen.

var slidingTabbarItem = SlidingTabbarItem()
item.image = UIImage(named: "show_me_when_passive")
item.highlightedImage = UIImage(named: "show_me_when_active")
item.title = "describe_the_controller"
item.controller = UIViewController() //the content you want to show

Latest podspec

{
    "name": "SlidingTabbarController",
    "version": "0.1.1",
    "summary": "Scrollable SlidingTabbarController for iOS.",
    "homepage": "https://github.com/yunuserenguzel/SlidingTabbarController",
    "license": "MIT",
    "authors": {
        "Yunus Eren Gu00fczel": "[email protected]"
    },
    "source": {
        "git": "https://github.com/yunuserenguzel/SlidingTabbarController.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "SlidingTabbarController": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This