Search code examples
iphoneuitabbar

Custom UITabbar


Is it possible to have a UITabBar in such a way that the following things are possible.

  1. Once the app opens, none of the Tabbar items are highlighted (not even the first one). (call it homeview)
  2. if the first Tabbar item is selected it goes to the first view and so on.
  3. Hide the UITabbar for certain Tabbar items.
  4. Allow any subview to go back to homeview.

Any tips on how to go about doing this will be appreciated.

Thanks


Solution

  • I had a similar thing to do:

    1. start with a navigation controller
    2. at some point show an UITabBar with multiple controllers
    3. from some controllers from the UITabBar continue the main navigation controller
    4. from any controller go to the home view (on logout)

    For this to work I pragmatically created the UITabBar and pushed it on the navigation stack and from the controllers in the UITabBar I pushed other views on the stack.

    To navigate to the root controller you can use this:

    [self.navigationController popToRootViewControllerAnimated:YES];