admin管理员组

文章数量:1646321

首先在info.plist里面添加LSApplicationQueriesSchemes(Array类型)
然后插入weixin, wechat, mqq的string类型子项,如下图:

// 判断手机是否安装QQ 微信App

// 判断手机是否安装QQ
    if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"mqq://"]]) {

        NSLog(@"install--");

    }else{

        NSLog(@"no---");

    }
// 判断手机是否安装微信
    if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"weixin://"]]) {

        NSLog(@"install--");

    }else{

        NSLog(@"no---");

    }

// 跳转QQ应用

UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
    // 提供uin, 你所要联系人的QQ号码
    NSString *qqstr = [NSString stringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web",model.uin];
    NSURL *url = [NSURL URLWithString:qqstr];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [webView loadRequest:request];
    [self.view addSubview:webView];

本文标签: 跳转iosqq