what do I have to do, to show a navigationbar in a view, that is presented via presentModalViewController?
I call the presentModalViewController from code.
When I segue to the same view in a storyboard, whitch in this case is embedded in a navcontroler, everything works fine.
Thx
Mica
You need to add a nav bar to a controller when presenting modally
Then in myViewController’s viewWillAppear method you can setup the a dismiss or close button for the modal controller.
Another way to do it if you are using a Storyboard is to just get the storyboard by name and instantiate the controller by identifier.
In the second example myViewController is a UINavigationController in the storyboard file.
I’m assuming ARC for all the code.