views:

176

answers:

2

I am very new to iPhone Development so pardon me if this is a novice question. I have an app with a RootController that controls loading the various views. It initially loads a MenuView. The MenuView has a button that when a user clicks I want to open a whole different view (called InfoView) that displays some information about the app and a back button that takes the user back to the MenuView.

Is there a way to call an IBAction function in the RootViewController from the MenuView?

Thanks in advance for the help.

A: 

In your button action, you need to do something like this:

UIViewController *nextController = [[UIViewController alloc] initWithNibName:... bundle:...];
[self.navigationController pushViewController:nextController animated:YES];
[nextController release];
Zoran Simic
A: 

Assuming your working with UIButtons you just hook up the Touch Up Inside event to an IBAction on your RootController in Interface Builder. If you're doing it in code you do something like this:

[button addTarget:rootController action:@selector(myActionOnRootController:) forControlEvents:(UIControlEventTouchUpInside)];
Ben Lachman