0

我想保存带有“.wai”扩展名的图像,以便通过whatsapp发送它。如何以这种格式保存图像?whatsapp 网站没有示例代码,有关更多信息,这是链接(可能访问此链接您了解我的问题)

http://www.whatsapp.com/faq/en/iphone/23559013

4

1 回答 1

1
NSData *pngData = UIImagePNGRepresentation(drawimg.image);
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsPath = [paths objectAtIndex:0];                        //Get the docs directory
filePath = [documentsPath stringByAppendingPathComponent:@"edited.wai"]; //Add the file name
[pngData writeToFile:filePath atomically:YES];
于 2013-11-14T05:11:12.827 回答