Skip to content

10clouds/FluidBottomNavigation-ios

Repository files navigation

FluidTabBarController

Version License Platform

Example

Example

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

Requirements

Installation

FluidTabBarController doesn't contain any external dependencies.

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

pod 'FluidTabBarController'

Usage

To use FluidTabBarController in your application first create the FluidTabBarController instance:

let tabBarController = FluidTabBarController()

Then create items for all of view controllers you want to add to the tab bar controller. You must use FluidTabBarItem to make animations work.

let mainViewController = MainViewController()
let mainViewControllerItem = FluidTabBarItem(title: "Main", image: UIImage(named: "main"), tag: 0)
mainViewController.tabBarItem = mainViewControllerItem

Create an array of your view controllers and assign it to the tab bar's viewControllers property.

tabBarController.viewControllers = [mainViewController]

Customization

You can change the color of selected item's text by setting the tint color of the tab bar. tabBarController.tabBar.tintColor = UIColor.red

Tint color example

You can also change the color of icons by specifying imageColor and highlightImageColor or text color by modifying textColor and highlightTextColor.

Author

Hubert Kuczyński, [email protected]

License

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

About

Fluid Bottom Navigation library for iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •