1

MFMailComposeViewController has been giving me headaches for the last 2 days...

Basically, I have an iOS7 iPhone app that uses storyboard with segues to offer both portrait and landscape views. Each view also has a tab bar at the bottom.

One of the tabs has a link enabling to send a feedback email.

I have used [self presentViewController:picker animated:YES completion:Nil]; to present MFMailComposeViewController.

It works perfectly in Portrait mode but then when I rotate in Landscape mode then all I get is a strange view and then nothing. (the app does not crash).

I did some research and found that may be I should try to present MFMailComposeViewController on the appDelegate viewController, so I used:

myWindAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
[appDelegate.window.rootViewController presentViewController:picker animated:YES completion:nil];

But then it complains that I am trying to display on a viewController that is not in the view...

Any help would be very very much appreciated.

Tirth
  • 7,801
  • 9
  • 55
  • 88
  • i had the same issue a year back http://stackoverflow.com/questions/13510749/mfmailcomposer-not-working-in-io6-landscape-mode i fixed it on presenting on the first view which is we called the rootviewController – Shehbaz Khan Nov 19 '13 at 12:38
  • Is that not what I doing when using: myWindAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];[appDelegate.window.rootViewController presentViewController:picker animated:YES completion:nil]; ? How else should I present it on the first view ? Thanks for your help ! – michael blaize Nov 19 '13 at 14:17

0 Answers0