I've found several places showing how to subclass UIApplication.openURL which is called when a user taps a hyperlink in a UITextView. However, I'm finding that this is not called when they tap a mailto link, and I only need to override mailto links. My app includes an email client, and since Apple will not allow me to make my app the "default" email client, I at least want mailto links inside my own program to use my app for sending email.
I first tried using a UIWebView instead, which did allow me to do this, however that had some display issues (I'm just displaying plain-text and it doesn't look/work as nice as the UITextView for that).
I have also tried overriding UIApplication.canShowURL but it is never called, not even for http: links. I've tried subclassing and also "Swizzling", both give same results.