- (void)CallOtherPartWithTelNumber:(NSString *)telNumber andType:(NSInteger)type
{
switch (type) {
case 1:
// 可以返回应用
telNumber = [NSString stringWithFormat:@"telprompt://%@", telNumber];
LMLog(@"打电话调用最后组合好的号码:%@--<<", telNumber);
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:telNumber]];
break;
case 2:
// 可以返回应用
telNumber = [NSString stringWithFormat:@"tel:%@", telNumber];
LMLog(@"打电话调用最后组合好的号码:%@--<<", telNumber);
if (_webView == nil) {
_webView = [[UIWebView alloc] initWithFrame:CGRectZero];
}
[_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:telNumber]]];
break;
case 3:
// 不能返回应用
telNumber = [NSString stringWithFormat:@"tel://%@", telNumber];
LMLog(@"打电话调用最后组合好的号码:%@--<<", telNumber);
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:telNumber]];
break;
default:
break;
}
}