I have a UITextView displaying non-editable text. I want the text to automatically parse links, phone numbers, etc for the user, and for those to be clickable.
I don't want the user to be able to highlight text, though, because I want to override those long press and double-tap interactions to do something different.
In order for links to be parsed in iOS7, the Selectable switch needs to be turned on for the UITextView, but Selectable also enables highlighting, which I don't want.
I tried overriding the LongPress gesture to prevent highlighting, but that seems to have disabled ordinary taps on links as well...
for (UIGestureRecognizer *recognizer in cell.messageTextView.gestureRecognizers) {
if ([recognizer isKindOfClass:[UILongPressGestureRecognizer class]]){
recognizer.enabled = NO;
}
if ([recognizer isKindOfClass:[UITapGestureRecognizer class]]){
recognizer.enabled = YES;
}
}
There are lots of similar threads out there but none seem to address this specific question of links enabled, text not highlightable.