UITextView link detection in iOS 7

Tobias picture Tobias · Sep 23, 2013 · Viewed 52.3k times · Source

I have a UITextView which is managed via Interface Builder. As data detection I have "Links" checked. In iOS 6 everything is working fine and links are highlighted and are clickable. In iOS 7 though, all links remain just plain text. The editable and selectable checkboxes are unchecked.

What may be of concern is that the UITextView is a subview of a container view which is again inside a UIScrollView.

Answer

Tobias picture Tobias · Sep 24, 2013

It seems that in iOS 7 link detection only works if the UITextView is selectable. So making my UITextView not selectable stopped the the link detection from working.

I also tested this in iOS 6 and I can confirm that in iOS 6 the link detection works fine even with the UITextView not being selectable.