gpt4 book ai didi

objective-c - 错误 : address doesn't contain a section that points to a section in a object file

转载 作者:太空狗 更新时间:2023-10-30 03:40:15 24 4
gpt4 key购买 nike

您好,我已经在论坛上进行了搜索,但没有找到任何帮助,所以我将其发布为新的。这是场景,我在主 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

请帮帮我

最佳答案

我也有这个错误,但有另一种情况。我有一个用@property (assign, nonatomic) 定义的 block 属性。

为了解决这个问题,我用@property (copy, nonatomic) 声明了我的 block 属性。

干杯

关于objective-c - 错误 : address doesn't contain a section that points to a section in a object file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13671293/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com