This way, I am crashing in the UItextview while the user is interacting with the URL link. All crash reports have only iOS version 11. This seems like a well-known bug in iOS 9, but there are no iOS versions for one report below 11, and in the report I found an interesting line:
UITextGestureClusterLinkInteract smallDelayRecognizer:
which comes with iOS 11 ( http://developer.limneos.net/?ios=11.0&framework=UIKit.framework&header=UITextGestureClusterLinkInteract.h ). Anyway, now I fixed it with
@available(iOS 10.0, *) func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool { UIApplication.shared.openURL(URL) return false }
which is not so great because you are losing the action menu. My assumption was that it was caused by 3D touch (for example, with a long press in previous versions), but if I detect 3D touch (75% or even 50% of maximum strength) and disables link interaction for this particular gesture - the problem still appears, Does anyone have some experience in this particular problem and a more elegant way to solve it?
source share