3

I use a web view with auto detecting phone numbers. If I tap on a phone link in the web view on my iPad the default action sheet is opened with add to contacts, copy and cancel buttons. Since I have no reference to the menu how can I dismiss this sheet when the app enters background state?

Best Regards Carsten

SamVimes
  • 75
  • 5
  • means you want to disable that link ? – Dipen Chudasama Feb 02 '12 at 10:38
  • Nope I want to execute the default action (in this case the action sheet is opened automatically) and dismiss the action sheet if the app is suspended. I am just curious if this is possible and how. – SamVimes Feb 02 '12 at 16:33

1 Answers1

0

You could try looking at the UIWebView Development Document, more importantly webView:shouldStartLoadWithRequest:navigationType: and you can look at the UIActionSheet delegate function referenced from this stackoverflow link iPhone Detecting if a UIAlert UIActionSheet are open and in the delegate method, you can see that

if ([view isKindOfClass:[UIActionSheet class]] && [[view buttonTitleAtIndex:0] isEqualToString:@"Call"]) {
    // Dismiss actionSheet
}

Also look at dismissWithClickedButtonIndex:animated: in UIActionSheet Class Reference which may do what you are looking for in terms of closing.

Community
  • 1
  • 1
Alex Muller
  • 1,565
  • 4
  • 23
  • 42