我想知道代码截图并调出电子邮件窗口并通过在应用程序中按一个按钮将截屏附加到电子邮件。到目前为止,我已经编写了代码来调出电子邮件窗口,只需按一下按钮,我就可以使用相同的按钮来获取并附加屏幕截图。如果你能指出我正确的方向,将不胜感激。应用内截图并附加到电子邮件IOS
- (IBAction)showEmail:(id)sender {
NSString *emailTitle = @"Test Email";
NSString *messageBody = @"CHECK OUT MY NEW SCORE!";
NSArray *toRecipents = [NSArray arrayWithObject:@"[email protected]"];
MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init];
mc.mailComposeDelegate = self;
[mc setSubject:emailTitle];
[mc setMessageBody:messageBody isHTML:NO];
[mc setToRecipients:toRecipents];
// Present mail view controller on screen
[self presentViewController:mc animated:YES completion:NULL];
}