![](SmoothTabBar.gif)
- Drag & drop source folder in your project directory.
1) Create TabItem Model like below that return [ViewController]
- TabItem model return Tab with Image, without Image & tabName
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.
- For More Info... Download Project and check all stuff configuration in AppDelegate
![Buy Me A Coffee](https://camo.githubusercontent.com/12f516d86d600c89a6abd2326256045c27325ad7c8532c0d36772965a4923be0/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)