Thomas Clayson
Thomas Clayson

Reputation: 29935

hide modal tab bar controller - from within a view controller IN the tab bar controller

I have a first view which has a funky menu thing. Then when you select a menu item it does [self presentModalViewController:tbc animated:YES]; (tbc being a tab bar controller with 5 navigation controllers within it).

In each of the navigation controllers I have a Home icon in the navigation bar.

I want to be able to link this button up to do the opposite of presentModalViewController:animated: and show the funky original menu system.

Is there any way to do this at all?

Thank you.

Upvotes: 3

Views: 735

Answers (1)

Ganesh
Ganesh

Reputation: 1079

I can suggest you the following code

-(void)homeButtonClicked { [self.navigationController dismissModalViewControllerAnimated:NO]; [funkyTabbarController setSelectedIndex:0];

}

Plese try it.

Upvotes: 2

Related Questions