Hi,
I am presenting MFMailComposeViewController(mailController) using presentModalViewController on my UIViewController, In mailController(subclass of MFMailComposeViewController) class i have overhide shouldAutorotateToInterfaceOrientation as
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
But in my UIViewController class i have overhide shouldAutorotateToInterfaceOrientation as(this is my project need)
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return NO;
}
After presenting my mailcontroller, if i rotate the device it works perfectly as expected( supporting landscapeleft/right orientation) in iPhone... But the same code is not working in iPad. Am i doing any mistake here? is it is Apple bug?
I am presenting using this api
[myViewController presentModalViewController:mailController animated:YES
];
and i am getting this warning on both iPhone and iPad The view controller <UINavigationController: 0x7720920> returned NO from -shouldAutorotateToInterfaceOrientation: for all interface orientations. It should support at least one orientation.
Thanks,