我想使用MFMailComposeViewController发送电子邮件,我已经有了这个设置,但我实际上无法将图像(屏幕截图)附加到电子邮件中.
这是代码行.
[composer addAttachmentData:image mimeType:image/png //png undeclared//fileName:@"GameOver Screenshot.png"]; //Incompatible Obj-C types 'struct UIImage *' expected 'struct NSData *' when passing argument 1 of .....//
Run Code Online (Sandbox Code Playgroud)
image是我的UIImage截图的名称.我不知道该替换它.
在此先感谢您的帮助/协助.
如何保存从代码中截取的屏幕截图,并将其放入应用程序中的电子邮件中?
iphone ×2
attachment ×1
cocoa-touch ×1
email ×1
mfmailcomposeviewcontroller ×1
objective-c ×1
screenshot ×1
uiimage ×1