7

I have the following problem:

In my application there's two ways to navigate to others screens: by buttons or by a tab bar.

All screens have the tab bar that calls the other screens but the home screen is the one that have buttons but doesn't have tab bar.

When I start developing my app I choose the tab bar application template and it works fine if I calls the screens by pressing the tab. The problem begins when I work with the home screen:

  • I need to "hide" the tab bar in this specific screen.
  • In the home screen, if I call a new screen by buttons the tab bar disappear in the new screen (make sense because the screen is calling by a button and not by the tab bar).

To resolve this to I think that maybe I can create a custom tab bar (I don't know yet how) and call it on my screens like a UIControl, so in that way if I need to change the tab bar the modifications will be able on all screens that calls that control.

What do you recommend? It's a good idea to create a custom tab bar and use it like a UIControl? if yes, how can I create one?

I use this to call the windows

RecurringGiftListViewController *listViewController = [[RecurringGiftListViewController alloc] initWithNibName:@"RecurringGiftListViewController" bundle:nil];
listViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; 
[self presentModalViewController:listViewController animated:YES]; 
[listViewController release];
jrturton
  • 118,105
  • 32
  • 252
  • 268
avmauricio
  • 1,008
  • 1
  • 7
  • 19
  • can you put bit code that you using to push views? – Ahmed Jun 22 '12 at 18:40
  • @Ahmed sure, I use, I use this to call the windows RecurringGiftListViewController *listViewController = [[RecurringGiftListViewController alloc] initWithNibName:@"RecurringGiftListViewController" bundle:nil]; listViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentModalViewController:listViewController animated:YES]; [listViewController release]; – avmauricio Jun 22 '12 at 19:57

2 Answers2

1

It doesn't sound like ou should be using a tabbar at all. A tabbar should not disappear when you push one of the buttons. Think of it like a main menu for your app. You can have other screens, like a navigation controller or a modal dialog that takes over the whole screen, but then you should be able to exit back to the tabbar.

Think through the structure of your user interface once more. Perhaps you can re-arrange it to make your "home screen" a dialog reachable from one of the tabbar pages?

geon
  • 8,128
  • 3
  • 34
  • 41
  • the problem is that the design of the app is created by the client so I don't think I can change it – avmauricio Jun 22 '12 at 20:00
  • 1
    When a client gives you a bad design, you need to educate them about why it is bad, and how the UI paradigms are supposed to work. I had a client who basically did a web design for their app, complete with tiny, tiny checkboxes. Trying to bend Cocoa Touch into a bad design is only going to cause you pain, and result in a bad product. It's a lose-lose situation. – geon Jun 22 '12 at 20:31
1

Your problem is that you're presenting your other view as 'modal'. Replace your code with this:

RecurringGiftListViewController *listViewController = [[RecurringGiftListViewController alloc] initWithNibName:@"RecurringGiftListViewController" bundle:nil];            
//listViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self.navigationController pushViewController:listViewController animated:YES]; 
[listViewController release];

Hope this will help

Ahmed
  • 772
  • 1
  • 9
  • 26