1

私のアプリは風景です。アプリ内メール コンポーザを横向きで起動し、そのように制限したいと思います。誰でもこれを行う方法をアドバイスできますか? アプリを横向きに保つために適切な自動回転設定を使用してView Controllerを作成しましたが、MFMailComposeViewControllerに横向きで起動してそこにとどまるように指示する方法がわかりません(キーボードの回転を停止します)。

ヘルプ?

4

2 に答える 2

0

これは彼のコメントへの回答であり、元の質問ではありません。 私もこの問題を抱えていましたが、このスニペットは私にとってはうまくいくようです:

[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeLeft];
于 2010-02-10T09:18:25.080 に答える
0

最初に 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];


}
于 2011-10-13T11:05:36.370 に答える