用户点击后,cell
我在一些代码后执行此操作:
[self.window.rootViewController presentModalViewController:mailer animated:YES];
然后当他点击取消按钮或发送此方法时:
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{
[[((UIViewController *)(self.superview.superclass)) presentedViewController] dismissModalViewControllerAnimated:NO];
}
但我的应用程序崩溃并退出。
012-12-17 18:52:09.243 testapp[8293:15203] Mail cancelled: you cancelled the operation and no email message was queued
2012-12-17 18:52:09.243 testapp[8293:15203] +[UIResponder presentedViewController]: unrecognized selector sent to class 0xbb5db0
2012-12-17 18:52:09.244 testapp[8293:15203] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIResponder presentedViewController]: unrecognized selector sent to class 0xbb5db0'
*** First throw call stack:
(0x1ba6022 0x1688cd6 0x1ba7aad 0x1b0ced0 0x1b0ccb2 0x4e466 0xa99bf 0xac64f 0xa63f2 0x8d05af 0x1ba7e99 0x50f14e 0x50f0e6 0x5b5ade 0x5b5fa7 0x5b5266 0x5343c0 0x5345e6 0x51adc4 0x50e634 0x1d39ef5 0x1b7a195 0x1adeff2 0x1add8da 0x1adcd84 0x1adcc9b 0x1d387d8 0x1d3888a 0x50c626 0x370d 0x26c5 0x1)