UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
NSURL *url = [NSURL URLWithString:@"mqq://im/chat?chat_type=wpa&uin= qq号 &version=1&src_type=web"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
webView.delegate = self;
[webView loadRequest:request];
[self.view addSubview:webView];
补充 :
因iOS10之后,上面的跳转到qq客户端的,方式已经不能实现(不灵了 不能正常跳转)以下方式是可以在iOS10 版本正常跳转
NSString *qq=[NSString stringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web",@"qq号码"]];
NSURL *url = [NSURL URLWithString:qq];
[[UIApplication sharedApplication] openURL:url];
网友评论