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

后端 未结 6 1026
你的背包
你的背包 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:16

    NSString *phoneNumber =  // dynamically assigned
    NSString *phoneURLString = [NSString stringWithFormat:@"tel:%@", phoneNumber];
    NSURL *phoneURL = [NSURL URLWithString:phoneURLString];
    [[UIApplication sharedApplication] openURL:phoneURL];
    

提交回复
热议问题