如何呼叫一个号码,当你点击它相同的iPhone电话簿



我想呼叫一个号码时,点击该号码(UIButton),就像在iphone电话簿?

NSURL *telURL = [NSURL URLWithString:@"tel:1-234-567-8901"];
[[UIApplication sharedApplication] openURL:telURL];

示例:

[[UIApplication application] openURL:[NSURL URLWithString:@"tel://99887766"]];

- (IBAction)buttonClicked
{
NSURL *telURL = [NSURL URLWithString:@"tel:urNumber"];
[[UIApplication sharedApplication] openURL:telURL];
}

相关内容

最新更新