Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 通过iPhone中的应用程序拨打电话_Ios_Iphone - Fatal编程技术网

Ios 通过iPhone中的应用程序拨打电话

Ios 通过iPhone中的应用程序拨打电话,ios,iphone,Ios,Iphone,我想拨打应用程序中的一个号码 请按照下面的链接进行相同的操作 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://9016098909891"]]; 您可以使用uitextview并启用电话检测。之后,电话号码将看起来像超链接。使用以下代码 mytextview.text = @"9943586256"; mytextview.dataDetectorTypes = UIDataDetectorType

我想拨打应用程序中的一个号码

请按照下面的链接进行相同的操作

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://9016098909891"]];

您可以使用uitextview并启用电话检测。之后,电话号码将看起来像超链接。使用以下代码

mytextview.text = @"9943586256";
mytextview.dataDetectorTypes = UIDataDetectorTypePhoneNumber;
mytextview.editable=NO;

如果您想在自定义tableview单元格中显示电话号码,这将非常有用。

@hypercrypt:是的,这是python字符串格式泄漏。谢谢,我已经更新了。
mytextview.text = @"9943586256";
mytextview.dataDetectorTypes = UIDataDetectorTypePhoneNumber;
mytextview.editable=NO;