首页 > Web开发 > 详细

两句话跳转QQ聊天界面 通过web方式

时间:2017-09-25 12:54:32      阅读:389      评论:0      收藏:0      [点我收藏+]

 

NSString *qq=[NSString stringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web",@"11027037153"];
    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];
    }

 

两句话跳转QQ聊天界面 通过web方式

原文:http://www.cnblogs.com/dujiahong/p/7591177.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!