I am having a view Controller lets say A.
I am presenting another View Controller lets say B on A.
In B’s view will appear I am creating a object of MPMoviePlayerController and presenting it on B.
Now in when movie player stop playing movie I am doing follwoing:
[self dismissMoviePlayerViewControllerAnimated];
[self dismissModalViewControllerAnimated:YES];
But this is only dismissing movie player. I want to go on my A’s view.
How can I dismiss two viewcontrollers back to back.
This is because of your movie player is being dismissed and you are trying to dismiss your view.
Use following:
Also please take note that
[self dismissModalViewControllerAnimated:YES];is deprecated in ios5 so better to use:dismissViewControllerAnimated:completion:. Please check UIViewController Class Reference.Hope this helps.