Coder Social home page Coder Social logo

mattiabugossi / kywheeltabcontroller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ykyouhei/kywheeltabcontroller

0.0 2.0 0.0 25.15 MB

KYWheelTabController is a subclass of UITabBarController.It displays the circular menu instead of UITabBar.

License: MIT License

Swift 93.69% Ruby 3.58% Objective-C 2.73%

kywheeltabcontroller's Introduction

KYWheelTabController

Carthage compatible Pod Version Pod Platform Pod License Language

KYWheelTabController is a subclass of UITabBarController.It displays the circular menu instead of UITabBar.

sample.gif

Installation

CocoaPods

KYWheelTabController is available on CocoaPods. Add the following to your Podfile:

pod 'KYWheelTabController'

Manually

Just add the Classes folder to your project.

Usage

It can be used in the same way as UITabBarController.

  • tabBarItem.title is not support.
  • tabBarItem.imageInsets is not support.
  • tabBarItem.badgeValue is not support.

Code

import UIKit
import KYWheelTabController

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        
        let vc0 = UIViewController()
        vc0.tabBarItem = UITabBarItem(
            title: nil,
            image: UIImage(named: "sample0"),
            selectedImage: UIImage(named: "sample0_selected"))
        
        let vc1 = UIViewController()
        vc1.tabBarItem = UITabBarItem(
            title: nil,
            image: UIImage(named: "sample1"),
            selectedImage: UIImage(named: "sample1_selected"))
        
        let vc2 = UIViewController()
        vc2.tabBarItem = UITabBarItem(
            title: nil,
            image: UIImage(named: "sample2"),
            selectedImage: UIImage(named: "sample2_selected"))
        
        let vc3 = UIViewController()
        vc3.tabBarItem = UITabBarItem(
            title: nil,
            image: UIImage(named: "sample3"),
            selectedImage: UIImage(named: "sample3_selected"))
        
        let wheelTabController = KYWheelTabController()
        wheelTabController.viewControllers = [vc0, vc1, vc2, vc3]

        /* Customize
         // selected boardre color.
         wheelTabController.tintColor = UIColor.redColor()
        */
        
        window?.rootViewController = wheelTabController
 
        return true
    }

Storyboard

  1. Set the KYWheelTabController to Custom Class of UITabBarController.

sample2.gif

License

This code is distributed under the terms and conditions of the MIT license.

kywheeltabcontroller's People

Contributors

ykyouhei avatar mattia-bugossi avatar

Watchers

James Cloos avatar Mattia Bugossi 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.