Hi there,
I've a problem and cannot find a solution to the whole day now. I'm new to iPhone SDK, so I guess I'm just missing something.
My app consists of a TabbedNavigation, having three ViewControllers. Everything works as expected. Now I want to open a new view (preferably from a NIB) when the user tabs a button (not the tab buttons...). The button's action method is called as expected. However, I don't get the new (table-)view loaded.
I try to give you some code that explains my situation:
First, in my Application's delegate's didFinishLaunchingWithOptions I load the tabBarController's view (the TabBarController is a property of the delegate):
// Add the tab bar controller's view to the window and display.
[window addSubview:tabBarController.view];
[window makeKeyAndVisible];
The first ViewController of the TabController is shown when the app is startet, as expected. This viewController has its custom ViewController class in which the action-method for the button sits. My action method looks like this:
-(IBAction)filtersButtonPressed:(id)sender {
FiltersTableViewController *filtersViewController =
[[FiltersTableViewController alloc] initWithNibName:@"Filters" bundle:nil];
[[[super tabBarController] navigationController] pushViewController:filtersViewController];
}
This, somehow, is not working... I have tried several things of course - with no success.
Can someone of you guys point me in the right direction? It cannot be that hard just to get to a new view by the press of a button...
Thanks in advance!
Chers, pawi