Up vote 1 down vote favorite share g+ share fb share tw.
I would like to catch the event of user's selection of either "Cancel" or "Call" of the native alert when user makes call from UIWebView. Is there anyway to do that? Iphone ios uiwebview link|improve this question edited Nov 17 '11 at 6:16soul1,213313 asked Nov 17 '11 at 5:59Espina234 20% accept rate.
– Ajeet Pratap Maurya Nov 17 '11 at 7:47 @Maurya, the webview has a "tel:1-408-xxxx" (phone number), user taps it, iOS will prompt a alert giving user 2 options: "Call" and "Cancel". I want to know how to capture user's action to those options. – Espina Nov 17 '11 at 15:55.
I think this may help you @interface UIWebView (JavaScriptAlert) (void)webView:(UIWebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame; @end @implementation UIWebView (JavaScriptAlert) (void)webView:(UIWebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame )frame { UIAlertView dialogue = UIAlertView alloc initWithTitle:nil message:message delegate:nil cancelButtonTitle:@"Okay" otherButtonTitles:nil; dialogue show; dialogue autorelease; } @end.
I think this blocks javascript alert. What I want is to block or capture event of user selection of the native alert which pops up when user tap the "tel:1-408-xxxxxx" number. – Espina Nov 17 '11 at 15:53 I think you going to loading .
Php file on webview, if yes then that alert from uiwebview not from native. – Neel Nov 17 '11 at 17:01 it's not, the alert is not in the webpage, but started by iOS itself. – Espina Nov 17 '11 at 18:36.
No you cannot capture the event as it is handle by device itself.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.