I am using a UITextView that displays different text depending on the course of user actions. Some text includes hyperlinks and some does not, so I would like to retain the UITextView's default setting to detect links. However, once I switch back to text that does not have a hyperlink, the entire text field is converted into a hyperlink for some link from the previous text. It is entirely blue, and if the user clicks on it, the app opens Safari to go to the link that's no longer there. I've tried setting the text to nil before replacing with real replacement text, but this hasn't worked:
infoLabel.text = nil;
Neither has this
infoLabel.text = @"";
Also I have tried explicitly setting the dataDetector type property on UILabel when I change the text, but then the text color is black even though I have set it to another color. So if I do this I have to reset the text color every time I reset the data detector type property. Quite frustrating. This feels like a bug. What am I missing?