我想呼叫一个号码时,点击该号码(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];
}