UIActivityViewController创建单独的邮件图标
问题描述:
我想创建一个UIActivityViewController,让用户发送有关当前正在查看的网页的反馈。我想有一个单独的按钮从邮件图标弹出与收件人设置,主题设置,邮件正文包括一些文本和当前网址(我得到的网址:NSURL * urlStringToShare = _webView .request.URL;在RootViewController中)。任何想法如何做到这一点?谢谢你的帮助。UIActivityViewController创建单独的邮件图标
答
例如,我已经有做这个的IBAction为:
- (IBAction)showEmail:(id)sender {
// Email Subject
NSString *emailTitle = @"Feedback on your latest column from the GlennKessler App:";
// Email Content
NSString *messageBody3 = @"I disagree with your latest Fact Check and the number of pinocchios you gave. This is what I would rate it instead and why:";
// To address
NSArray *toRecipents = [NSArray arrayWithObject:@"[email protected]"];
MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init];
mc.mailComposeDelegate = self;
[mc setSubject:emailTitle];
[mc setMessageBody:messageBody3 isHTML:NO];
[mc setToRecipients:toRecipents];
// Present mail view controller on screen
[self presentViewController:mc animated:YES completion:NULL];
}
任何方式将其转换成UIActivityViewController项目与图标?谢谢!