1、有提示框
NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"123456"];
UIWebView * callWebview = [[UIWebView alloc] init];
[callWebview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str]]];
[self.view addSubview:callWebview];
2、直接拨打
NSMutableString *str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"123456"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
网友评论