Я пытаюсь инициировать вызов из моего приложения для 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];
}
}
по указанному выше коду .. Я могу успешно позвонить ... но когда я заканчиваю звонок, я не могу вернуться в свое приложение
Итак, я хочу знать, как этого добиться, также ... пожалуйста, скажите мне, как мы можем инициировать вызов с помощью веб-просмотра ...