Skip to content

SmoothTabBar is inspired from SmoothBottomBar. Thus, I designed this for you.

Notifications You must be signed in to change notification settings

dhruvikdhanani/SmoothTabBar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SmoothTabBar

Installation

  • 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