0

When UITextView dataDetectorTypes is enabled, all links in the text does look clickable. But any "short links" like (http://bit.ly/link) are not clickable (even though the UITextView does draw them as links).

Is there any way to add/modify the detection algorithm to make also these links clickable? (In a way that does not use private APIs and the app can still be submitted to the app store).

4

1 回答 1

2

该链接应该可以自动检测并且可以毫无问题地点击。确保:

  1. 您的UITextView实例不可编辑
  2. 您的UITextViewdataDetectorTypes 包括UIDataDetectorTypeLink

在此处输入图像描述

在此处输入图像描述

于 2013-08-04T13:53:51.530 回答