我想補充的.jpg這樣:如何將gif添加到iPhone郵件的附件中?
UIImage *sentPic = self.image;
NSData *imageData = UIImageJPEGRepresentation(sentPic, 1);
[picker addAttachmentData:imageData mimeType:@"image/jpg" fileName:@"pic.jpg"];
我把它改爲「圖像/ GIF」。但它不能正常工作。 Th Gif只是郵件中的靜態圖片。
謝謝。這也適用:NSData * imageDataGif = [NSData dataWithContentsOfFile:[NSString stringWithFormat:@「%@/Documents/gif.gif」,NSHomeDirectory()]]; [picker addAttachmentData:imageDataGif mimeType:@「image/GIF」fileName:@「GifDemo.gif」]; –