-(IBAction)UC:(id)sender{
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"ucbrowser://"]]) {
[[UIApplication sharedApplication ] openURL:[NSURL URLWithString:@"ucbrowser://https://www.baidu.com"]];
NSLog(@"open uc...");
}
}
-(IBAction)LB:(id)sender{
//猎豹没实现,如果有知道,请回一下。谢谢。
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"lb://"]]) {
[[UIApplication sharedApplication ] openURL:[NSURL URLWithString:@"lb://https://www.baidu.com"]];
NSLog(@"open lb...");
}
}
-(IBAction)QQ:(id)sender{
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"mttbrowser://"]]) {
[[UIApplication sharedApplication ] openURL:[NSURL URLWithString:@"mttbrowser://url=https://www.baidu.com"]];
NSLog(@"open.qq..");
}
}
记得添加对应的Schema
网友评论