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]];

  • 相关阅读:
    python爬取哦漫画
    NLP系列(2)_用朴素贝叶斯进行文本分类(上)
    svm 笔记
    nlp学习笔记
    LR
    bp网络全解读
    最小二乘法
    学习参考
    pandas中的quantile函数
    泰坦尼克号与小费与乘客数量与 鸢尾花数据集
  • 原文地址:https://www.cnblogs.com/zhufeng1994/p/4708511.html
Copyright © 2011-2022 走看看