iOS开发用户打电话确认窗口的UI Alertview可以通过以下范例代码实现
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@”Title” message:@”Do you want to call…” delegate:self cancelButtonTitle:@”No” otherButtonTitles:@”Yes”, nil];
[alert show];
– (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat: @”tel://%@”, phoneNum]]];
}
}