tags:

views:

175

answers:

3

Hi,

I've a question, I want to show a View with out Pushing it to nav controller, it is very similar as with Native email UI, you go to Inbox folder and there you select "Compose" screen, compose screen is just animate from bottom to up without pushing this screen to nav controller.

How can i do the same thing?

Thanks for your time and help

+1  A: 

Sure, just add it as a subview of your window rather than pushing it to the nav controller.

Eric Petroelje
Thanks Eric for your quick reply.
+2  A: 

You can show any view controller as a "modal" view on top of the current nav/tab view controller, e.g.:

[self.navigationController presentModalViewController:anotherViewController animated:YES];

This gives you the "slide in" animation for free. You do need to arrange for the dismissModalViewControllerAnimated: to be called on the nav controller when you're done with the modal view, though. See the reference for UIViewController

Daniel Dickison
A: 

As Daniel was hinting to, presenting modal views is a UIViewController behavior, UInavigationController just inherits this from its superclass.

There is no need to have a UINavigationController to get this effect.

Corey Floyd
Thanks guys for your time and help