简体   繁体   English

如何以编程方式消除电话提示

[英]How to dismiss a telprompt programmatically

I am opening a dialog asking the user to call somewhere with this code : 我正在打开一个对话框,要求用户使用此代码调用某处:

-(void)callPhone:(NSString *)phone{
    NSURL *phoneURL = [NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@",phone]];
    [[UIApplication sharedApplication]openURL:phoneURL];
}

all is nice and great; 一切都很好。

however, this dialog appears over a tableview, and i want, when the user begins scrolling the tableview behind the dialog, to automatically dismiss this dialog. 但是,此对话框出现在表格视图上方,我希望当用户开始在对话框后面滚动表格视图时自动关闭该对话框。

How ? 怎么样 ?

As far as I know you can't as [[UIApplication sharedApplication]openURL:phoneURL]; 据我所知,你不能像[[UIApplication sharedApplication]openURL:phoneURL]; ends up asking the OS to handle the URL. 最终要求操作系统处理URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM