可能重复:
Action sheet doesn't display when the MFMailComposeViewController's cancel button is tappedMFMailComposeViewController的委托不处理CANCEL按钮
我根据苹果提供的代码示例中我的应用程序中实现标准邮件功能。
我设立委托如下:
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
,我实现
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
点击发送按钮调用的委托,这一切工作正常。但是,点击取消按钮不会调用委托,它只是调暗视图;该应用程序就在那里挂起。
这里阅读类似主题后,我一直在想,认为可能是关闭屏幕由于某种原因,这超出了我在这一点上理解。请注意,该视图是以编程方式创建的,并未使用xib文件。
任何想法或意见?
犯罪嫌疑人的委托没有设置正确,或者你已经在某种程度上“破”的邮件控制器,使得它在内部采取各种错误的环境。 –
您使用ARC吗? – Oscar