-1
我有一個iPad應用程序,由加載第二個視圖控制器的根視圖控制器組成。在第二個視圖控制器中,我有一個按鈕應該顯示MFMailComposeViewController
。爲什麼試圖在這裏呈現一個MFMailComposeViewController鎖定屏幕?
我的問題是:
在模擬器上,這工作正常。但是,在實際設備上,按此按鈕鎖定屏幕,似乎禁用所有用戶與接口交互。
我的代碼是:
//************** Send Email using Default IM ************************
-(void) showEmailModalView
{
NSLog(@"Start method <ExportStatisticsController> : <showEmailModalView> --");
// emailTextField.text = [emailTextField.text stringByReplacingOccurrencesOfString:@"(null)" withString:@""];
// subjectTextField.text = [subjectTextField.text stringByReplacingOccurrencesOfString:@"(null)" withString:@""];
// messageBodyTextView.text = [messageBodyTextView.text stringByReplacingOccurrencesOfString:@"(null)" withString:@""];
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self; // <- very important step if you want feedbacks on what the
//user did with your email sheet
[picker setSubject:@""];
NSArray *torec=[[NSArray alloc] initWithObjects:@"[email protected]", nil];
[picker setToRecipients:torec];
[torec release];
//------ message body ---
NSString *body [email protected]"";
[picker setMessageBody:body isHTML:NO]; // depends. Mostly YES, unless you want to send it as plain text (boring)
picker.navigationBar.barStyle = UIBarStyleBlack; // choose your style, unfortunately, Translucent colors behave quirky.
// picker.ModalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:picker animated:YES];
[picker release];
NSLog(@"End method <ExportStatisticsController> : <showEmailModalView> --");
}
什麼可能我是做錯了引起畫面凍結這樣嗎?
不知道什麼時候創建完全相同的問題,當前一個被關閉...什麼是 – Peres
有許多拼寫錯誤和困惑words.so我試圖讓它更清楚。如果它比以前清楚,請告訴我。 –
這是什麼操作系統? – prince