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

    // 1,这种方法,拨打完电话回不到原来的应用,会停留在通讯录里,而且是直接拨打,不弹出提示

       NSMutableString * str1=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"13913013703"];

                NSLog(@"str======%@",str);

        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str1]];

        

       //2,这种方法,打完电话后还会回到原来的程序,也会弹出提示,推荐这种

        NSMutableString * str2=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"13913013703"];

        UIWebView * callWebview = [[UIWebView alloc] init];

        [callWebview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str2]]];

        [self.view addSubview:callWebview];

        [callWebview release];

       [str release];

       

     

       //3,这种方法也会回去到原来的程序里(注意这里的telprompt),也会弹出提示

        NSMutableString * str3=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",@"13913013703"];                 

        NSLog(@"str======%@",str);

       [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str3]];

  • 相关阅读:
    搭建视频网站光线cms
    Linux FTP服务配置
    Chromium下载地址
    Ubuntu Server批量ping选择最快源
    vs2010扩展
    私有云
    mssql格式化输出
    CSLA .NET 3.6支持Silverlight 2
    Unity Application Block 1.2 for Silverlight December 2008
    silverlight寻奇 Graphite
  • 原文地址:https://www.cnblogs.com/zhufeng1994/p/4708511.html
Copyright © 2011-2022 走看看