跳轉評論、詳情
// 跳轉到詳情
NSString *str = [NSString stringWithFormat: @"itms-apps://itunes.apple.com/cn/app/id%@?mt=8", AppId];
UIApplication *app = [UIApplication sharedApplication];
NSURL *url = [NSURL URLWithString:str];
if ([app canOpenURL:url]) {
[app openURL:url];
}
// 跳轉到評論
NSString *str = [NSString stringWithFormat: @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@", AppId];
UIApplication *app = [UIApplication sharedApplication];
NSURL *url = [NSURL URLWithString:str];
if ([app canOpenURL:url]) {
[app openURL:url];
}
彈出電話
/**
* 客服電話
*/
@property (nonatomic, strong) UIWebView *webView;
- (UIWebView *)webView
{
if(!_webView)
{
_webView = [[UIWebView alloc] initWithFrame:CGRectZero];
}
return _webView;
}
// 客服電話
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", self.lbl_Telphone.text]]]];
跳轉QQ
// 跳到QQ
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web", self.qq]];
[self.webView loadRequest:[NSURLRequest requestWithURL:url]];
跳轉到微信
// 跳到微信
NSString *str =@"weixin://qr/JnXv90fE6hqVrQOU9yA0";
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str]]];
跳轉到微信公眾號
- 注:跳轉到微信公眾號膀值,首先需要到微信開發(fā)平臺棍丐,綁定對應的公眾號
if ([WXApi isWXAppInstalled]) {
JumpToBizProfileReq *req = [[JumpToBizProfileReq alloc]init];
req.username = @"公眾號原始ID";
req.extMsg = @"";
req.profileType =0;
[WXApi sendReq:req];
} else {
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
[pasteboard setString:self.weChatID];
[QQMMessage showSuccessMessage:@"已復制公眾號"];
}
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者