两句话跳转QQ聊天界面 通过web方式
2024-09-02 04:40:14
NSString *qq=[NSString stringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web",@""];
NSURL *url2 = [NSURL URLWithString:qq];
if ([[UIApplication sharedApplication] canOpenURL:url2]) {
[[UIApplication sharedApplication] openURL:url2];
}else{
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"对不起,您还没安装QQ" preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
return ;
}];
[alertController addAction:cancelAction];
[self presentViewController:alertController animated:YES completion:nil];
}
最新文章
- 25个有用的和方便的 WordPress 速查手册
- vim中大小写转换
- 有关使用seajs和template模板的总结
- Git哲学与使用
- poppin_xpower_ 常城
- A+B Problem 详细解答 (转载)
- 记录一下:chrome上,把网页保存为文件的插件
- CUBRID学习笔记 24 数据类型1
- [my]_ubuntu12.10_/etc/apt/sources.list
- ios球体弹跳游戏源码
- 使用 PHP 验证表单数据
- umount 卸载的时候,提示busy!
- nyoj 95 众数问题【水】
- (转载)偏序集的Dilworth定理学习
- sublime工具篇
- 更加清楚理解mvc结构
- github感悟
- Bootstrap3 表格-基本表格
- oracle 一些常用的sql优化规则
- FreeNAS插件打造ownCloud私有云网盘