Disabling 3D Touch from opening webviews on UITextView?

I have a UITextView that displays an NSAttributedString that contains links. When the user taps on a link, my in-app router routes the user to a different part of the app.


I noticed that on iOS 9, with 3d touch, users can now force touch the links which opens up a Safari webview. Often this creates a really bad user experience, or opens up parts of my website, which I don't want on the app.


Is there any way I can disable this?


I'm delegating textView:shouldInteractWithURLinRange: but this method isn't getting called at all for 3d touches...only regular taps.

Replies

I would also like to know of a way to fix such default behavior.

Currently there isn't a way to do this. Please file a bug report requesting a way to do this, it's a completely reasonable thing to want to do. Post the bug number here when you have it so I can keep an eye on it.

Currently to achieve this (in a totally unsupported way), is to drill down the `gestureRecognizers` array of the text view and disable the gesture recognizer with "Preview" in its class name.

Why can't i post, what bloody invalid characters!