4
我想用MFMailComposeViewController發送郵件。當我點擊我的應用程序上的一個按鈕時發生。當然,當我單擊郵件控制器的取消按鈕時,我想回到我的應用程序視圖,但它不起作用。該怎麼辦 ?這裏是我的代碼:MFMailComposeViewController:取消不會退出到我的應用程序?
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
[controller setSubject:@"Subject"];
[controller setMessageBody:@"<html>Test</html>" isHTML:YES];
[controller setToRecipients:nil];
if(controller) [self presentModalViewController:controller animated:YES];
感謝您的建議
沒錯,非常感謝。 – Rob
如果這對你是固定的,那麼你能接受答案嗎?謝謝。 – Damo
dismissModalViewControllerAnimated 現在已被棄用,您應該使用 dismissViewControllerAnimated改爲 – alasker