繁体   English   中英

telprompt没有警报

[英]telprompt without alert

我的应用程序需要拨打一个号码,我知道telprompt在拨号后返回应用程序。 但它会提醒用户每次都想拨打一个号码,有没有办法直接拨打电话号码而不显示提醒视图?

你可以使用以下代码打电话: -

NSString *value =@"9999999999";//your telnumber
NSURL *url = [[ NSURL alloc ] initWithString:[NSString stringWithFormat:@"tel://%@",value]];

NSLog(@"currunt number%@",url);
[[UIApplication sharedApplication] openURL:url]; 

希望这会有所帮助

tel直接调用给定的号码而没有确认,并且在呼叫结束后没有返回应用程序,所以可以使用telprompt而不是它。

     PhoneNumber=@"999999999";
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@", PhoneNumber]]];

暂无
暂无

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

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