Coder Social home page Coder Social logo

hemangshah / hhtabbarview Goto Github PK

View Code? Open in Web Editor NEW
152.0 9.0 20.0 1.25 MB

A lightweight customized tabbar view. ๐Ÿ“Œ

License: MIT License

Swift 98.03% Ruby 1.97%
uitabbar uitabbarcontroller custom-tabbar-controller tabbar tabbarcontroller

hhtabbarview's People

Contributors

hemangshah avatar senseiphonex avatar tobaloidee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hhtabbarview's Issues

Not working with pod

I tried to use with pod, but when I opened project it says code is developed with swift 2.x, I need to first migrate code using xcode 8

2018-09-12-11-43-52

Go back in navigation hierarchy when tapping on the same tab again.

Tab 1 โ†  Navigation Controller โ†ฆ View Controller 1 โ†’ View Controller 2 โ†’ View Controller 3

So we're in View Controller 3 and by tapping on the same tab (Tab 1) again, I will now take back to View Controller 1 (the first view-controller in navigation controller hierarchy).

To achieve this, I've made a slight change in on tab tapped closure block:

        hhTabBarView.onTabTapped = { (tabIndex, isSameTab, controller) in
            if isSameTab {
                if let navcon = controller as? UINavigationController {
                    navcon.popToRootViewController(animated: true)
                } else if let vc = controller as? UIViewController {
                    vc.navigationController?.popToRootViewController(animated: true)
                }
            }
            print("Selected Tab Index:\(tabIndex)")
        }

With this, there'll be a possible highlight issue will occurs as part of this change in 2.3.0, to fix this:

I am suggesting this solution: Integrate this functions in View Controller 1 (and all other where you will have similar navigation flow).

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        // This will be helpful in locking the current tab if we're already in the first view-controller in navigation flow.
        HHTabBarView.shared.lockCurrentTab()
    }
    
    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        // This will be helpful to unlock the locked tab when we're going forward from the first view-controller in navigation flow.
        HHTabBarView.shared.unlockAllTabs()
    }

P.S. Thanks Nishan for coming up with this issue. ๐Ÿ™๐Ÿผ

More than 5 Tabs won't work.

Here i added 6 tab, but only 5 tabs are works and other tab's tab-button appears but doesn't work.
Someone had solution for this please help., Thanks in advance

Logo proposal

Good day Sir @hemangshah ,

I am a graphics designer and i want to contribute on your project by designing a logo for it as a gift for free if you will permit me. I have noticed you don't have logo yet. Ill wait for your approval first before I start.

Thanks and best regards!
-Tobaloidee

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.