- (BOOL)callPhoneNumberWithString:(NSString *)phoneNumberString {
NSURL *url = [NSURL URLWithString:phoneNumberString];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
return YES;
}
return NO;
}
- (IBAction)callFirst:(id)sender {
[self callPhoneNumberWithString:@"tel:0123456789"];
}