I have a strange problem while dismissing two modalviewcontrollers.
What I am doing is I have a viewControllers A and B. I am presentingmodalviewController B on A. And then On B I am presenting MPMediaPickerController
on B. Now my issue is After clicking on Done button in MPMediaPickerController its delegate method is calling . I have implemented the below code to dismiss the MPMediaPickerController
and Controller B,so that We can go to Controller A directly.
- (void)mediaPicker:(MPMediaPickerController *)mediaPicker didPickMediaItems: (MPMediaItemCollection *) mediaItemCollection
{
[self.presentingViewController.presentingViewController dismissViewControllerAnimated:YES];
}
Same code is working for ViewControllers A, B and C but not working if third one is MPMediaPickerController
Any ideas or suggestions are very helpful.