【发布时间】:2014-06-11 11:04:50
【问题描述】:
在 iOS 7.1.1 上,我可以通过此代码在 Whatsapp 上分享图像..
if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"whatsapp://app"]]){
UIImage * iconImage = [UIImage imageNamed:@"image.png"];
NSString * savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/whatsAppTmp.wai"];
[UIImageJPEGRepresentation(iconImage, 1.0) writeToFile:savePath atomically:YES];
self.docController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:savePath]];
self.docController.UTI = @"net.whatsapp.image";
self.docController.delegate = self;
//[self.docController setAnnotation:@{@"WhatsappCaption" : @"https://itunes.apple.com/us/app/epic-ar/id535122470?ls=1&mt=8"}];
[self.docController presentOpenInMenuFromRect:CGRectMake(0, 0, 0, 0) inView:appDelegate.window.rootViewController.view animated: YES];
}
但我也想分享视频,我关注Wahtsapp tutorial上的教程
但是视频路径的代码怎么可能呢?
我的意思是,UIImage 对象的替代对象是什么来显示视频?
另外,我可以分享“链接”吗?
谢谢你,
【问题讨论】:
标签: ios objective-c video ios7.1 whatsapp