iPhone: Using MFMailComposeViewController API image problems
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"];
精彩评论