Question

I'm relatively new to iPhone programming but have read my way through a hefty book already.

I want to build a Tabbed Application where in one of the tabs I can push a button that presents a modal view over the screen.

I have built demo apps that utilize UITabBarController and the ModalView system, but I can't figure out how to combine them.

Help is greatly appreciated. I'm really stuck because it's this set up of the views that's the only thing I don't know how to do with my app. If you could give me a rundown (sample code) of how the setup should look, that would be fantastic.

thank you!

Was it helpful?

Solution

You can show a display a modal view controller from one of the tabs of your tab bar controller using the following code.

UIViewController* vc = [[[UIViewController alloc] init] autorelease];
[self presentModalViewController:vc animated:YES]

That will cause the View Controller to be displayed modally over the tab bar.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top