私のアプリは風景です。アプリ内メール コンポーザを横向きで起動し、そのように制限したいと思います。誰でもこれを行う方法をアドバイスできますか? アプリを横向きに保つために適切な自動回転設定を使用してView Controllerを作成しましたが、MFMailComposeViewControllerに横向きで起動してそこにとどまるように指示する方法がわかりません(キーボードの回転を停止します)。
ヘルプ?
これは彼のコメントへの回答であり、元の質問ではありません。 私もこの問題を抱えていましたが、このスニペットは私にとってはうまくいくようです:
[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeLeft];
最初に info.plist ファイルに次のプロパティを追加します
対応インターフェースの向き「横(右ホームボタン)」
presentModalViewController を使用するよりも
-(void)displayComposerSheet
{
MFMailComposeViewController *picker4 = [[[MFMailComposeViewController alloc]init]autorelease];
picker4.mailComposeDelegate = self;
[picker4 setSubject:result];
CGRect rect = CGRectMake(0,0,480,320);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
[view.layer renderInContext:context];
// Fill out the email body text
[self presentModalViewController:picker4 animated:NO];
}