Программный вызов из приложения iPhone и возврат обратно в приложение после завершения вызова

Я пытаюсь инициировать вызов из своего приложения для iphone, и я сделал это следующим образом ..

-(IBAction) call:(id)sender
{

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Call Besito" message:@"\n\n\n"
                                                   delegate:self cancelButtonTitle:@"Cancel"  otherButtonTitles:@"Submit", nil];


    [alert show];
    [alert release];
}

- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex
{
    if (buttonIndex != [alertView cancelButtonIndex])
    {
      NSString *phone_number = @"0911234567"; // assing dynamically from your code
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString    stringWithFormat:@"tel:%@", phone_number]]]; 
         NSString *phone_number = @"09008934848";
        NSString *phoneStr = [[NSString alloc] initWithFormat:@"tel:%@",phone_number];
        NSURL *phoneURL = [[NSURL alloc] initWithString:phoneStr];
        [[UIApplication sharedApplication] openURL:phoneURL];
        [phoneURL release];
        [phoneStr release];
    }
}

вышеупомянутым код .. Я могу успешно позвонить .. но когда я завершаю вызов, я не могу вернуться в свое приложение

Итак, я хочу знать, как этого добиться ... пожалуйста, скажите мне, как мы можем инициировать вызов с помощью веб-просмотра ...

8
задан Cœur 9 May 2019 в 14:34
поделиться