MFMailComposeViewController mapping in landscape

My application is based on landscapes. I would like to use the MFMailComposeViewController in the landscape, but cannot find anything to find out about the orientation. In the landscape, the MFMailComposeViewController displays only the top of the mail layout window coming from the left side when in the landscape. It mainly covers half of the landscape screen. Is there a way for the letter layout window to appear as a landscape rather than a portrait?

--- EDIT --- The view in which I would like to load mail compilation is output as follows:

//from first UIViewController
[self presentModalViewController:secondView animated:YES];

//from secondView (a UIViewController), I load the info view, which is where the mail compose shows
InfoController *infoController = [[InfoController alloc] initWithNibName:@"Info" bundle:[NSBundle mainBundle]];
[self.view addSubview:infoController.view];

From the foregoing, the mail composite parent view is the third loaded. In info.plist, I do this:

UIInterfaceOrientation = UIInterfaceOrientationLandscapeRight
+5
5

MailViewController UIViewController, UIViewController. . .

+6

Application Delegate .

@interface MFMailComposeViewController (AutoRotation)
// to stop auto rotation
@end

@implementation MFMailComposeViewController (AutoRotation)
// stop auto rotation
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // should support all interface orientations.
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
@end
+7

, MFMailComposeViewController ...

, UIImagePickerController , , ...

self.bounds = CGRectMake(0, 0, 480, 320);
self.center = CGPointMake(160, 240);
self.transform = CGAffineTransformMakeRotation(M_PI / 2);

MFMailComposeViewController , .

0

"presentModalViewController:" rootViewController ( AppDelegate).

, , MFMailComposeViewController rootViewController, viewControllers, rootViewController navigationController.

- :

    [((AppDelegate *)[UIApplication sharedApplication]).window.rootViewController presentViewController:mailVC animated:YES];
0

this one works for me ...

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    //    return (YES);
    return (interfaceOrientation==UIInterfaceOrientationLandscapeRight);
}

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
    if (UIInterfaceOrientationIsLandscape(toInterfaceOrientation))
    {
        ......
    }
}    
-1
source

All Articles