开发者

iPhone: Using MFMailComposeViewController API image problems

开发者 https://www.devze.com 2023-02-13 09:21 出处:网络
I am using MFMailComposeViewController API in iPhone app to send images via Email. It displays correctly on iPhone but fails to show the image in Computer.

I am using MFMailComposeViewController API in iPhone app to send images via Email.

It displays correctly on iPhone but fails to show the image in Computer.

When we click that image on computer it shows "no preview av开发者_运维技巧ailable".

We are using PNG images.

What could be wrong?

Code:

  NSData *myData = [[NSData alloc] initWithContentsOfFile:FilePath]

  [emailAPIObject addAttachmentData:myData mimeType:@"image/png" fileName:@"Image"];


I got this code working with small changes:

NSData *myData = [NSData dataContentsOfFile:FilePath];   
[emailAPIObject addAttachmentData:myData mimeType:@"png" fileName:@"Image.png"];
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号