【发布时间】:2012-05-07 10:52:13
【问题描述】:
我将我的对象保存在 NSData 格式的 NSMutablearray 中。不,我尝试附加到电子邮件正文中。这里是代码。
- (IBAction)sendEmail
{
if ([MFMailComposeViewController canSendMail])
{
NSArray *recipients = [NSArray arrayWithObject:@"example@yahoo.com"];
MFMailComposeViewController *controller = [[MFMailComposeViewController
alloc] init];
controller.mailComposeDelegate = self;
[controller setSubject:@"Iphone Game"];
NSString *string = [viewArray componentsJoinedByString:@"\n"];
NSString *emailBody = string;
NSLog(@"test=%@",emailBody);
[controller setMessageBody:emailBody isHTML:YES];
[controller setToRecipients:recipients];
[self presentModalViewController:controller animated:YES];
[controller release];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert"
message:@"Your device is not set up for email." delegate:self
cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alert show];
[alert release];
}
}
我没有收到任何错误,但在 E-mail.in NSLog 中没有看到任何数据我看到了这个..2012-05-07 15:33:22.984 Note List[273:207] test=>]请建议任何一个对我来说更好的解决方案是如何在电子邮件正文中附加我的 NSMutableArray 数据..
【问题讨论】:
-
您能否详细说明可变数据的来源?如何创建实例?
-
感谢先生回复我。我以其他方式详细发布这个问题只是访问我的个人资料..我认为你很好地理解了我的问题,我认为先生你为我建议了更好的解决方案..Thanx
-
您可以发布问题的链接吗?我在你的个人资料中找不到它。
-
再次感谢这里是链接先生。stackoverflow.com/questions/10479036/…
标签: iphone objective-c nsmutablearray nsdata mfmailcomposeviewcontroller