Reputation: 13
If I use the UIDataDetectorTypePhoneNumber on a UITextView, and click a phone number on a device that has no phone (e.g. iPad), I get a Send Message / Add to Contacts / Copy popover. Is there some way to bring up that dialog directly in code or would I have to reimplement?
I did try [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:5555555"]]; but that does not bring up the dialog.
There are some subtle differences between how detected links and buttons behave and my client wants a clickable phone number that behaves like a button.
Upvotes: 1
Views: 238
Reputation: 655
I did some method swizzling to see where this popover comes from, and it looks like it is generated before the openURL: method in UIApplication.
Digging further, it looks like the popover comes from some private objects in UITextView.
I think you'll have to reimplement.
Upvotes: 0