2

I have a UITabBarController in my mainWindow.xib,when i click on a tabbar item in UITabBarController i want a new view to appear with different UITabBarController....So pls help me to do this by suggesting me tutorials and examples ...

Thank you.

user1285402
  • 143
  • 2
  • 12

2 Answers2

4

What you'r like to do is against the HIG and will confuse users using your app. What about placing your sub-tabbar-navigation within a UITableView and then use a UINavigationController to navigate? That would be the apple-like-way.

Jonas Schnelli
  • 9,965
  • 3
  • 48
  • 60
  • could u pls give me sample code to use the way u have suggested – user1285402 Apr 16 '12 at 07:17
  • @user1285402: what Jonas is saying is true: application with that kind of behaviour would definetly not pass the approval proccess. It's hard to give a code example since first you're gonna have to rethink your viewcontroller layout and hierarchy. Check [View Controller Programming Guide for iOS](http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007457-CH1-SW1) – Rok Jarc Apr 16 '12 at 08:28
  • yes , you are right, i don't know that apple wont accept this, but can you give a good solution for @user1285402 have two tab bars in application, i am also thinking in which way will apple accept it – Charan Apr 16 '12 at 09:18
2

Just add new tabBar in the new view which is opening with your tabbar item and hide the present tabbar

[[UITabBar appearance] setHidden:YES];

Then go on

Charan
  • 4,940
  • 3
  • 26
  • 43
  • I have already given you, just add [[UITabBar appearance] setHidden:YES]; after touching your tab bar item and change your name in your profile, that is not your name – Charan Apr 16 '12 at 07:20