views:

42

answers:

0

I have a share button in a popover that pushes MFMailComposeViewController. The popover correctly becomes a modal view, as it's supposed to, until i dismiss the modal. The problem is that, while it keeps the width of the popover (320.0), it grows to the height of the view. I would like to set the mail view to a height of 500.0.

Here's the code I'm using:

    [mailView setMessageBody:emailBody isHTML:YES]; 
    mailView.modalPresentationStyle = UIModalPresentationCurrentContext;
 mailView.contentSizeForViewInPopover = CGSizeMake(320.0, 400.0);
 mailView.navigationBar.barStyle = UIBarStyleDefault;

 [self presentModalViewController:mailView animated:YES];

It seems to be ignoring the line:

mailView.contentSizeForViewInPopover = CGSizeMake(320.0, 400.0);

Any ideas of how I can manually set the height?