如何在 iOS 中以编程方式调用包含号码和访问代码的电话号码?
例如:
number: 900-3440-567
Access Code: 65445
最佳答案
UIDevice *device = [UIDevice currentDevice];
if ([[device model] isEqualToString:@"iPhone"] ) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:130-032-2837"]]];
} else {
UIAlertView *notPermitted=[[UIAlertView alloc] initWithTitle:@"Alert" message:@"Your device doesn't support this feature." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[notPermitted show];
[notPermitted release];
}
关于ios - 在 iOS 中以编程方式调用带有访问代码的电话号码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5456395/