NSURL *url;
// QQ
url = [NSURL URLWithString:[NSString stringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web", @"QQ号"]];
// 微信
// url = [NSURL URLWithString:@"weixin://"];
// 电话
// url = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", @"电话号码"]];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}
iOS开发笔记之跳转QQ聊天页、跳转微信、应用内拨打电话
最新推荐文章于 2024-08-04 03:42:35 发布