zoukankan      html  css  js  c++  java
  • iOS 拨打电话三种方式

     1 1,这种方法,拨打完电话回不到原来的应用,会停留在通讯录里,而且是直接拨打,不弹出提示
     2  NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"186xxxx6979"];
     3     //            NSLog(@"str======%@",str);
     4 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
     5     
     6 
     7 2,这种方法,打完电话后还会回到原来的程序,也会弹出提示,推荐这种
     8 NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"186xxxx6979"];
     9     UIWebView * callWebview = [[UIWebView alloc] init];
    10     [callWebview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str]]];
    11     [self.view addSubview:callWebview];
    12     [callWebview release];
    13     [str release];
    14 
    15 
    16 
    17 
    18 3,这种方法也会回去到原来的程序里(注意这里的telprompt),也会弹出提示
    19  NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",@"186xxxx6979"];
    20     //            NSLog(@"str======%@",str);
    21     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
  • 相关阅读:
    LA 3938 动态最大连续和 线段树
    UVA 11235 频繁出现的数值 RMQ
    LA 4329 ping-pong树状数组
    LA 3027 合作网络 并查集
    vue-url传参
    vue打开新页面的几种方式
    父子组件传参
    vue--按钮级别的权限控制+插件的使用
    小程序填坑
    webpack小试牛刀
  • 原文地址:https://www.cnblogs.com/-yun/p/7464751.html
Copyright © 2011-2022 走看看