zoukankan      html  css  js  c++  java
  • iOS 拨打电话

    方法- ,拨打完电话回不到原来的应用,会停留在通讯录里,而且是直接拨打,不弹出提示
    NSMutableString * phoneStr=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"188xxxx8888"];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneStr]];
        
    方法二,打完电话后还会回到原来的程序,也会弹出提示
    NSMutableString * phoneStr=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"188xxxx8888"];
        UIWebView * callWebview = [[UIWebView alloc] init];
        [callWebview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:phoneStr]]];
        [self.view addSubview:callWebview];

    方法3,这种方法也会回去到原来的程序里(注意telprompt),也会弹出提示
    NSMutableString * phoneStr=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",@"188xxxx8888"];

      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneStr]]
     
  • 相关阅读:
    centos 给终端设快捷键
    centos 给鼠标右击添加 “打开终端” 菜单项
    centos 6.X 安装输入法
    centos U盘安装
    js的构造函数
    onresize的定义方式
    两个时间对比
    AMD和CMD的区别
    spring加载配置文件
    cglib代理
  • 原文地址:https://www.cnblogs.com/zero-zql/p/5089434.html
Copyright © 2011-2022 走看看