I have a password viewcontroller which is presented always when app is activated.
I have another viewcontroller which is presented on click of a button. In this there is a process to be shown and once it is complete dissmiss itself.
The scenario is:
1) Present this view contoller, process starts.
2) Before this process is finished, press home button.
3) Now open app again.
4) Password viewcontroller is presented, as it is mandatory.
5) At this time that process started in step 1 completes. Dismiss method is called. But Password view controller is dismissed instead of this process VC.
How can I dismiss particular presented VC?
**Edit:**
I tried a different way for this. When I present passcodeVC from appdelegate, I create a new navigation and set it to rootViewController. Earlier nav is stored in a reference. Here I succeded in keeping passcode view. Passcode view is not dismissed now.
When user enters passcode then I change rootviewcontroller again to old. I thought this will work. But, it does not. MailVc is dismissed. And when I try to present mailVC again, it says this is already presented.
Seems like, since I change rootVC, and then dissmissVC is called when it is not present in view. Can some one explain me this.
Thanks.