STTabbar

A subclass on UITabbar that provides a custom shape to Tabbar.


Keywords
curved-tabbar, ios, raised-center, raisedbutton, shape, shaped-tabbar, swift, swift4, tabbar, tabbarview, uitabbar
License
MIT
Install
pod try STTabbar

Documentation

STTabbar

CI Status Version License Platform

A subclass on UITabbar that provides allows you to customize a shape of UITabbar with raised center button. You can change appearance of tabbar according to your needs.

alt tag

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 10.0+ Xcode 10.0+ Swift 4.2+

Installation

STTabbar is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'STTabbar'

Usage

  1. Setup Stoaryboard. Add UITabbarViewcontroller in the storyboard.
  2. Craete custom TabbarController class using below code.
class CustomTabViewController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        if let myTabbar = tabBar as? STTabbar {
            myTabbar.centerButtonActionHandler = {
                print("Center Button Tapped")
            }
        }
    }
}
  1. Go to stoaryboard and change UITabBarController class to CustomTabViewController.

alt tag

  1. Also change UItabBar class to STTabbar.

alt tag

Author

11Shraddha, shraddhasojitra11@gmail.com

License

STTabbar is available under the MIT license. See the LICENSE file for more info.