How to click on another navigation controller correctly

I have a VC that needs to push to ANOTHER navigation controller. If I just

self.navigationController?.pushViewController(self.storyboard!.instantiateViewControllerWithIdentifier("someID") as someVC, animated: true)

      

this does not work. I can add

    dispatch_async(dispatch_get_main_queue()) { 
         self.navigationController?.pushViewController(self.storyboard!.instantiateViewControllerWithIdentifier("someID") as someVC, animated: true)
    }

      

So it works, but since I know this is not the case, how to use it. What should I use? presentViewController

?

+3


source to share


1 answer


You should only push subclasses of UIViewController inside the navigation controller. This question might help!



+1


source







All Articles