Possible Duplicate:
How to find out if user pressed call or cancel button when making call from my app?
I can dial a phone number in ios using following code:
NSURL *url = [NSURL URLWithString:@"tel://123"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
UIWebView *webView = [[UIWebView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
[webView loadRequest:request];
since there will show an alert view after run this code, how can I detect whether user press Cancel button or Call button?
This isn’t directly possible without jailbreaking your device. However, as suggested by @J Shapiro in this post, you could use the following code to listen for the
UIApplicationSuspendedNotificationnotification.