when i insert this code it will make an error how can i handle event without error?
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{
switch (result)
{
case MFMailComposeResultCancelled:
URLCacheAlertWithError(@"Result: canceled");
//message.text = @"Result: canceled";
break;
case MFMailComposeResultSaved:
URLCacheAlertWithError(@"Result: saved");
//message.text = @"Result: saved";
break;
case MFMailComposeResultSent:
URLCacheAlertWithError(@"Result: sent");
//message.text = @"Result: sent";
break;
case MFMailComposeResultFailed:
URLCacheAlertWithError(@"Result: failed");
//message.text = @"Result: failed";
break;
default:
URLCacheAlertWithError(@"Result: not sent");
// message.text = @"Result: not sent";
break;
}
}
2010-01-31 22:07:05.638 iPortals[1678:207] *** -[NSCFString localizedDescription]: unrecognized selector sent to instance 0x38474
2010-01-31 22:07:05.643 iPortals[1678:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString localizedDescription]: unrecognized selector sent to instance 0x38474'
2010-01-31 22:07:05.649 iPortals[1678:207] Stack: (
844776241,
843056877,
844780055,
844282517,
844245696,
20767,
12345,
807831445,
807768071,
807781201,
844553639,
807717485,
844537573,
851058789,
851397973,
844537573,
851058789,
851058693,
851058647,
851057969,
851060293,
851056221,
851054649,
851040559,
851039143,
848378745,
844528685,
844526429,
848374975,
848375147,
850798447,
850793587,
9135,
9068
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.