0

Possible Duplicate:
Make phone call on iPhone and take user back to app? (UIWebView does it)

I have an UITableView in tableview cell,there have a phone number.After selecting cell,want to make a call and after disconnected call from both side(dialer and receiver)want to back in my apps view.How its possible.Please help me.Thanks in advanced.

Community
  • 1
  • 1

2 Answers2

1

Try

-(void)makeACall:(NSString *)strContactNumber
{   
    UIWebView *webView = [[UIWebView alloc] init];    
    NSString *ph_no = [NSString stringWithFormat:@"tel:%@",strContactNumber];    
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:ph_no]]];
}
Girish
  • 4,692
  • 4
  • 35
  • 55
0

Try this:

NSString *deviceType = [UIDevice currentDevice].model;
        if([deviceType isEqualToString:@"iPhone"])
        {
            NSString *phoneNumber = [@"tel://" stringByAppendingString:@"8437327307"];
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]];
        }
        else
        {
            UIAlertView *device = [[UIAlertView alloc] initWithTitle:@"ipod" message:@"Can't Call from this device" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
            [device show];
            [device release];
        }
Vishal
  • 8,246
  • 6
  • 37
  • 52