0

I add "phone" image in my app. When I press that phone image, it calls instantly. However, all I want to make is that when I press, then show the phone dialup keypad appear that make to think to call or not.
I make it in swift. Here is my codes.

if let phoneCallURL:NSURL = NSURL(string: "tel://\(phoneNumber)") {
    let application:UIApplication = UIApplication.sharedApplication()
    if (application.canOpenURL(phoneCallURL)) {
        application.openURL(phoneCallURL);
    }
}
pbaris
  • 4,525
  • 5
  • 37
  • 61
May Phyu
  • 895
  • 3
  • 23
  • 47
  • This is not possible, the only document scheme for the dialer is `tel:`. You might just want to add your own confirm dialog in the method. – rckoenes Jul 21 '16 at 09:33
  • Yes, I would like to add confirm dialog box. Could you please tell me how to implement this? – May Phyu Jul 21 '16 at 09:38
  • Add a [`UIAlertView`](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIAlertView_Class/) or [`UIAlertController`](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIAlertController_class/) for iOS 8 or later – rckoenes Jul 21 '16 at 09:41

0 Answers0