Minitour / AZTabBarController

A custom tab bar controller for iOS written in Swift 4.2
MIT License
348 stars 65 forks source link

Pushed to new controller from its child controller #36

Closed Sajjad-Zafar closed 5 years ago

Sajjad-Zafar commented 6 years ago

how to hide the tabbar on a view controller that is pushed from tab 0.

Minitour commented 6 years ago

@Sajjad-Zafar Hi, sorry for the late response. There are 2 ways of dealing with this issue:

  1. Push from the tab bar controller and not from tab 0:

    //in tab 0
    self.currentTabBar?.pushViewController(controller, animated: true)
  2. Push from tab 0 but hide the bar

    self.currentTabBar?.set(hidden: true)
    pushViewController(controller, animated: true)

I personally recommend the first solution, since that way you don't have to manually show/hide the bar.