Logo

0x3d.Site

is designed for aggregating information.
Welcome
check repository here

HHTabBarView

A lightweight customized tabbar view.

License Platform Swift 4.x MadeWithLove Awesome-Swift

  1. Screenshots
  2. Features
  3. Installation
  4. Setup
  5. ToDos
  6. Credits
  7. Thanks
  8. License

Screenshots

Only Icon Icon (top) with title (bottom) Only Title
Icon (left) with title (right) Icon (right) with title (left) Icon (bottom) with title (top)
HHTabBarView top position HHTabBarView top position (iPhoneX)
Usage

Features

  1. Easily Configurable and Setup. Create tabs with Title, or Image or both.
  2. Dynamic Tabs Configurations.
  3. Detect Taps in a completion block.
  4. Show/Hide Badge Value in individual tabs. Easily Configure as per the needs.
  5. Lock/Unlock particular tabs.
  6. Easily show/hide UINavigationBar and HHTabBarView.
  7. Lightweight with zero dependancies.
  8. Change UI of HHTabBarView (LeftToRight or RightToLeft) as per the needs.
  9. Change HHTabBarView position as per UI requirements. Supports: Top and Bottom (Default).
Note: I don't recommended displaying HHTabBarView at the top. It's always good at the bottom.

Installation

  1. Manually – Add HHTabBarView/Source folder to your Project. And you're good to use HHTabBarView.

  2. CocoaPods: – pod 'HHTabBarView'

You can read the CHANGELOG file for a particular release.

Setup

Important: Please note that HHTabBarView is currently not supports UIStoryBoard. Means, you will have to create HHTabBarView programmatically. It is advised to setup HHTabBarView in AppDelegate.swift for your easyness.

  1. Initialize and keeping reference of HHTabBarView. 📌
    let hhTabBarView = HHTabBarView.shared
  1. Keeping reference of iOS default UITabBarController. 📌
    let referenceTabBarController = HHTabBarView.shared.referenceUITabBarController
  1. Setup referenced UITabBarController 📌
    func setupReferenceUITabBarController() -> Void {
        
        //Creating a storyboard reference
        let storyboard = UIStoryboard.init(name: "Main", bundle: Bundle.main)
        
        //Creating navigation controller for navigation inside the first tab.
        let navigationController1: UINavigationController = UINavigationController.init(rootViewController: storyboard.instantiateViewController(withIdentifier: "FirstViewControllerID"))
        
        //Creating navigation controller for navigation inside the second tab.
        let navigationController2: UINavigationController = UINavigationController.init(rootViewController: storyboard.instantiateViewController(withIdentifier: "SecondViewControllerID"))
        
        //Update referenced TabbarController with your viewcontrollers
        referenceTabBarController.setViewControllers([navigationController1, navigationController2], animated: false)
    }
  1. Setup HHTabBarView 📌
    //Update HHTabBarView reference with the tabs requires.
    func setupHHTabBarView() -> Void {
        
        //Default & Selected Background Color
        let defaultTabColor = UIColor.white
        let selectedTabColor = UIColor.init(red: 234/255, green: 218/255, blue: 195/255, alpha: 1.0)
        let tabFont = UIFont.init(name: "Helvetica-Light", size: 14.0)
        
        //Create Custom Tabs
        let t1 = HHTabButton.init(withTitle: "Calendar", tabImage: UIImage.init(named: "Calendar")!, index: 0)
        t1.titleLabel?.font = tabFont
        t1.titleLabel?.textColor = UIColor.black
        t1.setHHTabBackgroundColor(color: defaultTabColor, forState: .normal)
        t1.setHHTabBackgroundColor(color: selectedTabColor, forState: .selected)
        
        let t2 = HHTabButton.init(withTitle: "Refresh", tabImage: UIImage.init(named: "Refresh")!, index: 1)
        t2.titleLabel?.font = tabFont
        t2.titleLabel?.textColor = UIColor.black
        t2.setHHTabBackgroundColor(color: defaultTabColor, forState: .normal)
        t2.setHHTabBackgroundColor(color: selectedTabColor, forState: .selected)
        
        //Note: As HHTabButton are subclassed of UIButton so you can modify it as much as possible.
        
        //Set Custom Tabs
        hhTabBarView.tabBarTabs = [t1, t2]
        
        //Set Default Index for HHTabBarView.
        hhTabBarView.defaultIndex = 1
        
        //Show Animation on Switching Tabs
        hhTabBarView.tabChangeAnimationType = .none
        
        //Handle Tab Change Event
        hhTabBarView.onTabTapped = { (tabIndex) in
            print("Selected Tab Index:\(tabIndex)")
        }
    }
  1. Setup window of your application inside the 📌
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        
        //Setup HHTabBarView
        setupReferenceUITabBarController()
        setupHHTabBarView()
        
        //Setup Application Window
        self.window = UIWindow.init(frame: UIScreen.main.bounds)
        self.window?.rootViewController = self.referenceTabBarController
        self.window?.makeKeyAndVisible()
        
        return true
    }
  1. Done! ✅

ToDo[s]

  • Update README with multiple example usage and screenshots.

You can watch to HHTabBarView to see continuous updates. Stay tuned.

Have an idea for improvements of this class? Please open an issue.    

Credits

Hemang Shah

You can shoot me an email to contact.  

Thank You!!

See the contributions for details.

License

The MIT License (MIT)

Read the LICENSE file for details.

Swift
Swift
Swift is Apple’s programming language for developing iOS, macOS, and watchOS applications. It’s fast, safe, and easy to learn, with features like type safety and memory management, enabling efficient app development.
GitHub - hirohisa/PageController: Infinite paging controller, scrolling through contents and title bar scrolls with a delay
GitHub - hirohisa/PageController: Infinite paging controller, scrolling through contents and title bar scrolls with a delay
GitHub - Quick/Nimble: A Matcher Framework for Swift and Objective-C
GitHub - Quick/Nimble: A Matcher Framework for Swift and Objective-C
GitHub - roberthein/BouncyLayout: Make. It. Bounce.
GitHub - roberthein/BouncyLayout: Make. It. Bounce.
GitHub - fjcaetano/RxWebSocket: Reactive WebSockets
GitHub - fjcaetano/RxWebSocket: Reactive WebSockets
GitHub - Kitura/Kitura: A Swift web framework and HTTP server.
GitHub - Kitura/Kitura: A Swift web framework and HTTP server.
GitHub - exyte/ProgressIndicatorView: An iOS progress indicator view library written in SwiftUI
GitHub - exyte/ProgressIndicatorView: An iOS progress indicator view library written in SwiftUI
GitHub - rolandleth/LTHRadioButton: A radio button with a pretty animation
GitHub - rolandleth/LTHRadioButton: A radio button with a pretty animation
GitHub - ashishkakkad8/AKSwiftSlideMenu: Slide Menu (Drawer) in Swift
GitHub - ashishkakkad8/AKSwiftSlideMenu: Slide Menu (Drawer) in Swift
GitHub - BastiaanJansen/toast-swift: Customizable Swift Toast view built with UIKit. 🍞
GitHub - BastiaanJansen/toast-swift: Customizable Swift Toast view built with UIKit. 🍞
GitHub - Jintin/Swimat: An Xcode formatter plug-in to format your swift code.
GitHub - Jintin/Swimat: An Xcode formatter plug-in to format your swift code.
GitHub - thoughtbot/Runes: Infix operators for monadic functions in Swift
GitHub - thoughtbot/Runes: Infix operators for monadic functions in Swift
GitHub - tid-kijyun/Kanna: Kanna(鉋) is an XML/HTML parser for Swift.
GitHub - tid-kijyun/Kanna: Kanna(鉋) is an XML/HTML parser for Swift.
GitHub - ParkGwangBeom/Windless: Windless makes it easy to implement invisible layout loading view.
GitHub - ParkGwangBeom/Windless: Windless makes it easy to implement invisible layout loading view.
GitHub - pkluz/PKHUD: A Swift based reimplementation of the Apple HUD (Volume, Ringer, Rotation,…) for iOS 8.
GitHub - pkluz/PKHUD: A Swift based reimplementation of the Apple HUD (Volume, Ringer, Rotation,…) for iOS 8.
GitHub - shtnkgm/ImageTransition: Library for smooth animation of images during transitions.
GitHub - shtnkgm/ImageTransition: Library for smooth animation of images during transitions.
GitHub - hyperoslo/Sugar: :coffee: Something sweet that goes great with your Cocoa
GitHub - hyperoslo/Sugar: :coffee: Something sweet that goes great with your Cocoa
GitHub - mukeshthawani/TriLabelView: A triangle shaped corner label view for iOS written in Swift.
GitHub - mukeshthawani/TriLabelView: A triangle shaped corner label view for iOS written in Swift.
GitHub - yonat/BatteryView: Simple battery shaped UIView
GitHub - yonat/BatteryView: Simple battery shaped UIView
GitHub - suzuki-0000/CountdownLabel: Simple countdown UILabel with morphing animation, and some useful function.
GitHub - suzuki-0000/CountdownLabel: Simple countdown UILabel with morphing animation, and some useful function.
GitHub - sindresorhus/DockProgress: Show progress in your app's Dock icon
GitHub - sindresorhus/DockProgress: Show progress in your app's Dock icon
GitHub - Yalantis/GuillotineMenu: Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine.
GitHub - Yalantis/GuillotineMenu: Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine.
GitHub - MrSkwiggs/Netswift: A type-safe, high-level networking solution for Swift apps
GitHub - MrSkwiggs/Netswift: A type-safe, high-level networking solution for Swift apps
GitHub - evermeer/AttributedTextView: Easiest way to create an attributed UITextView (with support for multiple links and from html)
GitHub - evermeer/AttributedTextView: Easiest way to create an attributed UITextView (with support for multiple links and from html)
GitHub - rosberry/texstyle: Format iOS attributed strings easily
GitHub - rosberry/texstyle: Format iOS attributed strings easily
GitHub - ra1028/DiffableDataSources: 💾 A library for backporting UITableView/UICollectionViewDiffableDataSource.
GitHub - ra1028/DiffableDataSources: 💾 A library for backporting UITableView/UICollectionViewDiffableDataSource.
GitHub - Mijick/PopupView: Popups presentation made simple (SwiftUI)
GitHub - Mijick/PopupView: Popups presentation made simple (SwiftUI)
GitHub - envoy/Embassy: Super lightweight async HTTP server library in pure Swift runs in iOS / MacOS / Linux
GitHub - envoy/Embassy: Super lightweight async HTTP server library in pure Swift runs in iOS / MacOS / Linux
GitHub - shima11/FlexiblePageControl: A flexible UIPageControl like Instagram.
GitHub - shima11/FlexiblePageControl: A flexible UIPageControl like Instagram.
GitHub - ChiliLabs/CHIOTPField: CHIOTPField is a set of textfields that can be used for One-time passwords, SMS codes, PIN codes, etc. Mady by @ChiliLabs - https://chililabs.io
GitHub - ChiliLabs/CHIOTPField: CHIOTPField is a set of textfields that can be used for One-time passwords, SMS codes, PIN codes, etc. Mady by @ChiliLabs - https://chililabs.io
GitHub - LeonardoCardoso/SectionedSlider: iOS 11 Control Center Slider
GitHub - LeonardoCardoso/SectionedSlider: iOS 11 Control Center Slider
Swift
More on Swift

Programming Tips & Tricks

Code smarter, not harder—insider tips and tricks for developers.

Error Solutions

Turn frustration into progress—fix errors faster than ever.

Shortcuts

The art of speed—shortcuts to supercharge your workflow.
  1. Collections 😎
  2. Frequently Asked Question's 🤯

Tools

available to use.

Made with ❤️

to provide resources in various ares.