【发布时间】:2013-11-21 12:41:17
【问题描述】:
当链接包含视频 ID 时,代码可以与其他链接一起正常工作,但不适用于 youtube 链接...
NSString*str=[NSString stringWithFormat:@"http://youtube.com/watch?v=%@",myVideoId];
NSString*Wastring2=[ NSString stringWithFormat:@"whatsapp://send?text=%@",str];
NSURL *whatsappURL = [NSURL URLWithString:Wastring2];
if ([[UIApplication sharedApplication] canOpenURL: [whatsappURL absoluteURL]]) {
[[UIApplication sharedApplication] openURL: [whatsappURL absoluteURL]];
}
谢谢。
【问题讨论】:
标签: ios iphone ios5 url-scheme