Question

We are using a MFMailComposeViewController to send an email out. For some reason, in iOS 7 under Landscape view, the right edge of the text in the message body is being cut off as if its clipping bounds were roughly 50 px inset from the edge. The clipped part of the text area still responds to taps and shows highlighting when making selections (with no text visible).

This problem does not happen in Portrait view, nor in iOS 6.1. The other fields in the view (To, Cc/Bcc, Subject) do not experience this issue either.

I am establishing the view with something similar to the following code:

if ([MFMailComposeViewController canSendMail]) {
    MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
    picker.mailComposeDelegate = self;
    picker.modalPresentationStyle = UIModalPresentationFullScreen;
    picker.navigationBar.barStyle = UIBarStyleBlack;

    NSString *content = [NSString stringWithFormat: @"Body of the email. %@", someText];
    [picker setMessageBody:content isHTML:NO];

    [viewController presentViewController:picker animated:YES completion:nil];
}

Checking the view's bounds just after presentation (picker.view.bounds.size.width & .height) gives me the expected 768x1024.

Neither the official docs nor header files give me any indication of what might be going on. What has changed in iOS 7, and how can I correct it?

Was it helpful?

Solution

I think UIModalPresentationFullScreen could be the problem. The mail compose view is usually intended to be presented as UIModalPresentationPageSheet.

At any rate, you should open a bug report at https://bugreport.apple.com.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top