大佬教程收集整理的这篇文章主要介绍了xcode – 应用内屏幕截图并附加到电子邮件而不保存到库中,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
- (void)buttonPress:(id)sender { UIGraphicsBeginImageContext(self.view.frame.sizE); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage * image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); NSData * imageData = UIImageJPEGRepresentation(image,1.0); if ( [MFMailComposeViewController canSendMail] ) { MFMailComposeViewController * mailComposer = [[[MFMailComposeViewController alloc] init] autorelease]; mailComposer.delegate = self; [mailComposer addAttachmentData:imageData mimeType:@"image/jpeg" filename:@"attachment.jpg"]; /* Configure other setTings */ [self presentModalViewController:mailComposer animated:YES]; } }
以上是大佬教程为你收集整理的xcode – 应用内屏幕截图并附加到电子邮件而不保存到库中全部内容,希望文章能够帮你解决xcode – 应用内屏幕截图并附加到电子邮件而不保存到库中所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。