Making a call programmatically from iPhone app and returning back to the app after ending the call

后端 未结 6 1025
你的背包
你的背包 2020-12-03 15:25

I am trying to initiate a call from my iphone app,and I did it the following way..

-(IBAction) call:(id)sender
{

    UIAlertView *alert = [[UIAlertView allo         


        
6条回答
  •  悲&欢浪女
    2020-12-03 16:04

    following code will not return to your app [no alertview will show before make call]

    UIWebView *callWebview = [[UIWebView alloc] init];
    NSURL *telURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",phoneNumber]];
    [callWebview loadRequest:[NSURLRequest requestWithURL:telURL]];
    

    following code will return to your app "alertview will show before make call"

    UIWebView *callWebview = [[UIWebView alloc] init];
    NSURL *telURL = [NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@", phoneNumber]];
    [callWebview loadRequest:[NSURLRequest requestWithURL:telURL]];
    

提交回复
热议问题