Lets say I have two controller A & B and 1 MFMessageComposeViewController.
I am performing these operations
A-> presentModalViewController -> B
B-> presentModalViewController -> MFMessageComposeViewController object
So on message compose didFinishWithResult delegate I want to go back to A Controller not on B.
I have tried several steps like 2 times dismissModalViewControllerAnimated in delegate and calling A controller directly from delegate but nothing its working. Everytime it dismisses only single time and it remains on B controller.
On cancel/send i want to go back to A controller.
As you mentioned, dismiss it twice.
First with,
[self dismissModalViewControllerAnimated:NO];Then,
[self dismissModalViewControllerAnimated:YES];