Skip to content

Instantly share code, notes, and snippets.

@gliubc
Created July 11, 2019 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gliubc/3d13a79dcab6c5c8cea50a1da8c392f1 to your computer and use it in GitHub Desktop.
Save gliubc/3d13a79dcab6c5c8cea50a1da8c392f1 to your computer and use it in GitHub Desktop.
- (void)chatWithQQ:(NSString *)qq {
if (!qq.length) {
[SVProgressHUD showInfoWithStatus:@"QQ号码不存在"];
return;
}
if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"mqq://"]]) {
[SVProgressHUD showInfoWithStatus:@"您尚未安装QQ应用"];
return;
}
NSString *url = [NSString stringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web", qq];
[self openScheme:url];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment