lundi 2 mars 2015

MFMailComposeViewController and MFMessageComposeViewController have wrong bounds after rotation in iOS 8

I have an app that mostly only uses portrait mode. However, when it presents MFMailComposeViewController and MFMessageComposeViewController it is able to rotate to landscape. This has worked fine until iOS 8 where they still rotate, but their bounds seem to follow the wrong orientation.


I have the app in portrait mode and present one of those controllers. When I rotate phone into landscape I get the following result:


MFMailComposeViewController:


enter image description here


MFMessageComposeViewController:


enter image description here


EDIT: Here is the code for presenting the composers:



MFMailComposeViewController *mailComposeViewController = [[MFMailComposeViewController alloc] init];
mailComposeViewController.mailComposeDelegate = self;
[mailComposeViewController setSubject:subject];
[mailComposeViewController setMessageBody:body isHTML:NO];

[self presentViewController:mailComposeViewController animated:YES completion:^{
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
}];



Aucun commentaire:

Enregistrer un commentaire