我在 tableview 单元格中有一个 UITableView,有一个电话号码。选择单元格后,想要拨打电话,并且在双方(拨号器和接收器)断开呼叫后想要返回我的应用程序视图。它怎么可能。请帮助我。先谢谢了。
问问题
122 次
2 回答
1
尝试
-(void)makeACall:(NSString *)strContactNumber
{
UIWebView *webView = [[UIWebView alloc] init];
NSString *ph_no = [NSString stringWithFormat:@"tel:%@",strContactNumber];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:ph_no]]];
}
于 2013-01-09T06:14:40.607 回答
0
尝试这个:
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];
}
于 2013-01-09T06:11:15.240 回答