跳转到微信,qq小技巧

2016-08-23  本文已影响3150人  默默的前行

//跳到qq页面

UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
            NSURL *url = [NSURL URLWithString:@"mqq://im/chat?chat_type=wpa&uin=&version=1&src_type=web"];
            NSURLRequest *request = [NSURLRequest requestWithURL:url];
            webView.delegate = self;
            [webView loadRequest:request];
            [self.view addSubview:webView];

//跳到微信页面,和applestore

  [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://weixin.qq.com/r/o3W_sRvEMSVOhwrSnyCH"]];

//直接跳转到微信界面

 NSString *str =@"weixin://qr/JnXv90fE6hqVrQOU9yA0";
            
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
上一篇下一篇

猜你喜欢

热点阅读