Reputation: 1072
My UIWebView shows a web page which contains the URL tel:+123456789
<a href="tel:+123456789">Phone link</a>
When I click on this link on iPhone, my UIWebViewDelegate gets called correctly.
- (BOOL)webView:(UIWebView *)webView
shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType
When I click on this link on iPad, my UIWebViewDelegate does not get called at all. Instead a UIActionSheet appears automagically with the options 'Add to Contacts', 'Copy' and 'Cancel'.
Is there a way to catch "tel:" HTML links from a UIWebView on a device that does not have phone capabilities e.g. an iPad.
This behaviour is the same for the simulator:
Upvotes: 5
Views: 643
Reputation: 845
Have you tried a simple:
if ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad )
{
return YES; /* Device is iPad */
}
Upvotes: -2