Latest 0.1.4
Homepage https://github.com/zhihuilong/ZHTabBarController
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

CI Status
Coverage Status
Version
License
Platform
Swift version

An alternative for UITabBarController´╝îwhich support all kinds of Custom TabBarController.

Requirements

Compatible with Xcode 8.2 / Swift 3.0

Installation

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

platform :ios, '8.0'
use_frameworks!

pod "ZHTabBarController"

Basic usage

1.Import ZHTabBarController module.

Swift:

import ZHTabBarController

Obj-C:

@import ZHTabBarController;

2.Make sure your AppDelegate confirm ZHTabBarControllerProtocol and implement two computing variables.

var childViewControllers: [UIViewController] { get }
var items: [ZHItemData] { get }

3.Replace the default ‘applicationDidFinishLaunching(_ application: UIApplication)’ method.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    window = UIWindow(frame: UIScreen.main.bounds)
    let vc = ZHTabBarController()
    vc.delegate = self
    window!.rootViewController = UINavigationController(rootViewController: vc)
    window!.makeKeyAndVisible()
    return true
}

Customization

You can customize following UI properties,

  1. tabBayStyle
  2. tabBarHeight
  3. tabBarColor
  4. tabBarItemTitleColor
  5. tabBarItemSelectedTitleColor
let vc = ZHTabBarController(style: .Default, tabBarHeight: 44)
vc.tabBarColor = UIColor.white
vc.itemTitleColor = UIColor.black
vc.itemSelectedTitleColor = UIColor.black

Todo

  • [x] Travis CI
  • [ ] Code Coverage
  • [ ] Cocoadocs
  • [ ] Snapshot
  • [ ] Support more styles
  • [ ] Carthage support

Author

Zhihui, [email protected]

License

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

Latest podspec

{
    "name": "ZHTabBarController",
    "module_name": "ZHTabBarController",
    "version": "0.1.4",
    "summary": "An alternative for UITabBarControlleruff0cwhich support all kinds of Custom TabBarController.",
    "homepage": "https://github.com/zhihuilong/ZHTabBarController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "zhihuilong": "[email protected]"
    },
    "source": {
        "git": "https://github.com/zhihuilong/ZHTabBarController.git",
        "tag": "0.1.4"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ZHTabBarController/Classes/**/*",
    "frameworks": "UIKit",
    "requires_arc": true,
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This