dhruvikdhanani / SmoothTabBar

SmoothTabBar is inspired from SmoothBottomBar. Thus, I designed this for you.
19 stars 5 forks source link
animation easy-to-use easytabbar ios pureswift smooth smoothanimatedtabbar smoothbottombar smoothtabbar swift tabbar tabbarcontroller tabbaritem tabbatanimation uitabbarcontroller xcode

SmoothTabBar

Installation

1) Create TabItem Model like below that return [ViewController]

let v1 = ViewController()
TabItem(v1, imageName: "home", tabName: "Home")

// v1 stands for ViewController
// pass image name as String
// pass tabName as String

func smoothTab() -> [TabItem] {
  let v1 = HomeViewController()

  let v2 = HomeViewController()

  let v3 = HomeViewController()

  let v4 = HomeViewController()

  let t1 = TabItem(v1, imageName: "home", selectedImage: nil, tabName: nil)
  let t2 = TabItem(v2, imageName: "search", selectedImage: nil, tabName: nil)
  let t3 = TabItem(v3, imageName: "cart", selectedImage: nil, tabName: nil)
  let t4 = TabItem(v4, imageName: "profile", selectedImage: nil, tabName: nil)

  return [t1,t2,t3,t4]
}

2) Set AppTabBarViewController as rootViewController in didFinishLaunchingWithOptions

window = UIWindow(frame: UIScreen.main.bounds)
let tab = AppTabBarViewController.init(nibName: "AppTabBarViewController", bundle: nil, smoothData: smoothTab())
window?.rootViewController = tab
window?.makeKeyAndVisible()

Now Boommmmm & Run. Your one star give me a lot inspiration.

Buy Me A Coffee