我的應用程序是基於橫向的。我想在橫向上使用MFMailComposeViewController,但找不到任何關於方向的信息。在橫向上,MFMailComposeViewController僅顯示郵件撰寫窗口的頂部,在橫向時從左側進入。基本上它覆蓋了一半的景觀屏幕。有沒有辦法讓郵件撰寫窗口出現在橫向而不是縱向?在橫向上顯示MFMailComposeViewController
--- --- EDIT其中 我想載入郵件撰寫的視圖導出這樣的:
//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];
根據上述內容,郵件撰寫父視圖是第三個加載。在Info.plist中,我這樣做:
UIInterfaceOrientation = UIInterfaceOrientationLandscapeRight
我使用MFMailComposeViewController的委託在一個UIViewController:
你需要這樣的事情。我必須使用self.view.bounds等。如果我在UIViewController的viewDidLoad中設置了它,它將加載我不想要的肖像。如果我在顯示郵件撰寫視圖之前執行此操作,則會得到與OP中相同的結果。 – 4thSpace 2009-07-09 03:18:11
在郵件撰寫視圖之前您展示了什麼樣的視圖?你有沒有告訴操作系統你處於橫向模式,還是你正在做自己的繪圖,只是讓它橫向? – 2009-07-10 15:14:37
對不起。我已經編輯了OP來回應你的問題。請看一看。 – 4thSpace 2009-07-15 15:05:26