在Simulator中发送iOS8的电子邮件问题

时间:2014-09-30 08:34:24

标签: ios objective-c iphone ios7 ios8

我在模拟器中的iOS8问题中有问题不起作用?有人可以帮我吗?

这里的消息是字符串消息,但它没有出现在邮件表中? 这是我试过的!!

       NSMutableString* sub = [NSMutableString string];
       [message appendFormat:@"\n"];
       [sub appendString:@"Item Id :  "];
       [sub appendString:item.item_id];

       UIImage *img = self.thumbnailImageView.image;

       NSMutableArray *actItems = [[NSMutableArray alloc] init];
       [actItems addObject:message];
       [actItems addObject:sub];
       if(img != nil)
       {
           [actItems addObject:img];
       }

       UIActivityViewController *activityViewController =  [[UIActivityViewController alloc] initWithActivityItems:actItems
                                                                                             applicationActivities:nil];

       activityViewController.excludedActivityTypes = @[UIActivityTypePostToFacebook,
                                                        UIActivityTypePostToTwitter,
                                                        UIActivityTypeAirDrop];

       [self.navigationController presentViewController:activityViewController
                                               animated:YES
                                             completion:^{}];

       [activityViewController setValue:sub forKey:@"subject"];
        activityViewController.popoverPresentationController.sourceView = parentView;

0 个答案:

没有答案