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 eg an iPad.
This behaviour is the same for the simulator:
Have you tried a simple:
if ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad )
{
return YES; /* Device is iPad */
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.