【发布时间】:2014-11-21 14:59:55
【问题描述】:
我的应用程序允许用户通过单击按钮调用另一个应用程序。但用户不想分享他们的号码。也就是说,当用户尝试拨打另一个电话时,应用程序将隐藏他们的手机号码并仅显示他们保存在数据库中的姓名或任何随机数字。在iOS中可以吗?
我知道如何在 iOS 中进行移动通话。
NSString *phNo = @"+912436580";
NSURL *phoneUrl = [NSURL URLWithString:
[NSString stringWithFormat:@"telprompt:%@",phNo]];
if ([[UIApplication sharedApplication] canOpenURL:phoneUrl]) {
[[UIApplication sharedApplication] openURL:phoneUrl];
} else
{
UIAlertView *calert = [[UIAlertView alloc]
initWithTitle:@"Alert"
message:@"Call facility is not available!!!"
delegate:nil
cancelButtonTitle:@"ok"
otherButtonTitles:nil, nil];
[calert show];
}
是否可以隐藏主叫号码?请帮帮我。
【问题讨论】:
-
你的意思是用手机应用打电话?
-
是的。在我的应用中单击一个按钮即可拨打电话。
标签: ios cocoa-touch phone-call