嗨,我在这里搜索了论坛,但没有找到帮助,所以我发布新的.这是场景,我在主rootviewcontroller中创建一个mfmailcomposeviewcontroller,我通过调用presentviewcontroller来显示它但是当它被解除时我得到这个错误:
error: address doesn't contain a section that points to a section in a object file
我正在使用的代码如下:
-(void) mailButtonTapped { if ([MFMailComposeViewController canSendMail]) { mailViewController_ = [[MFMailComposeViewController alloc] init]; mailViewController_.mailComposeDelegate = self; [mailViewController_ setSubject:@"Try ..."]; [mailViewController_ setMessageBody:@"Hey I just tried ..." isHTML:NO]; NSData *videoData = [NSData dataWithContentsOfURL:movieURL_]; [mailViewController_ addAttachmentData:videoData mimeType:@"video/quicktime" fileName:@"Video.mov"]; [self presentViewController:mailViewController_ animated:YES completion:nil]; } else { UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Sharing Not Possible" message:@"Configure your mail to send the mail" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; [alertView show]; [alertView release]; } } -(void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { NSString *title = @"Email"; NSString *msg = nil; if (result == MFMailComposeResultFailed) msg = @"Unable to send,check your email settings"; else if (result == MFMailComposeResultSent) msg = @"Email Sent Successfully!"; else if (result == MFMailComposeResultCancelled || result == MFMailComposeResultSaved) msg = @"Sending Cancelled"; UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:title message:msg delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; [alertView release]; [self dismissViewControllerAnimated:YES completion:nil];
}
解雇后我收到错误:
error: address doesn't contain a section that points to a section in a object file
请帮我