iOS 拨打电话的几种类型

来源:互联网 发布:mysql unique查询 编辑:程序博客网 时间:2024/05/07 19:37

    //ios中有三种拨打电话的方式

    //1 可以直接打电话 ,,没有那种呼叫类型的弹框 拨打结束后停留在通讯录

   NSString *phoneNumberString1 = @"tel:189********";

    [[UIApplicationsharedApplication]openURL:[NSURLURLWithString:phoneNumberString1]];

    

    //2 会出现呼叫弹框 拨打完电话留在程序中

    NSString *phoneNumberString2 = @"tel:189********";

    UIWebView *phoneWeb = [[UIWebViewalloc]init];

    [phoneWebloadRequest:[NSURLRequestrequestWithURL:[NSURLURLWithString:phoneNumberString2]]];

    [self.view addSubview:phoneWeb];

    

    //3  和第二中其实是一样的 效果

    

   NSString *phoneNumberString3 = @"telprompt://189********";

    [[UIApplicationsharedApplication]openURL:[NSURLURLWithString:phoneNumberString3]];

    

0 0
原创粉丝点击