I have a navigation controller stack with different possible controllers in it.
I want to present a view controller modally as and when I need it based on the next view I am pushing in to navigation controller. (You can think of that as user login validation screen..which validates user before moving to next screen.)
I am able to do it successfully with
UIApplication.sharedApplication().keyWindow?.rootViewController?.presentViewController(contactPicker, animated: true, completion: nil)
and dismiss it when I need to dismiss with
UIApplication.sharedApplication().keyWindow?.rootViewController?.dismissViewControllerAnimated(false, completion: {
self.navigationController.pushViewController(myNewVC, animated: true)
})
I am able to do it however the transition from modally presented view to my (myNewvC) new push for next view is not exactly how i want it to be. When view dismiss happen I can see my caller screen for a second before i move to next view. I don't want to see that screen. Is it possible?
(Also I don't want to add validation screen in navigation stack as purpose of that screen is not to be part of navigation stack).