Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITextView: Link detection working within Simulator, not on device

Tags:

ios

uitextview

I've got two UITextViews containing data that should be recongised by the data detection, however whilst one works fine on both device and simulator there's one that only works under Simulator. I've attempted trashing the build from my device, cleaning the product down, removing derived data and nothing seems to resolve the inconsistency.

Link detection was enabled within Interface Builder, the data is passed in with a NSString stringWithFormat: formatted string and set with UITextView setText:. Set the same way for both, so there's no difference there, but it just doesn't seem to work correctly for one of them.

EDIT: On the device if I tap on one of the items that should detect as a link, it'll then turn blue and do link detection. I'm not setting any custom fonts or colours that could have an impact.

like image 299
Nicholas Smith Avatar asked Mar 22 '23 01:03

Nicholas Smith


1 Answers

It appears that the trick is to setScrollable:NO. Seems to fix the problem, although if you need scrolling, I'm not sure what the answer will be...

like image 195
Darren Oster Avatar answered Apr 07 '23 22:04

Darren Oster