PresentModalViewController does nothing

I have a UIViewController (parent) that calls presentModalViewController with another UIViewController (child) on viewDidLoad .

If the parent does not have a UINavigationController, then presentModalViewController does nothing. If it has a UINavigationController, then presentModalViewController displays the children as expected.

Is this the standard behavior of presentModalViewController or is there something else here?

+4
source share
2 answers

This is because you are presenting it in viewDidLoad , try presenting it in viewDidAppear .

+6
source

Debug the application and see if the child-view is nil, if it is zero, then this is not standard behavior, otherwise I consider this to be standard behavior.

Hope this helps ...

0
source

All Articles