NSAttributeString - How to remove auto formatting for a date or time item?

59 views Asked by At

With NSAttributeString, it auto creates formatting and clickable events for date or time elements within that NSAttributeString

But what I'd like to do is remove the date handling, and its formatting from the NSAttributedString and handle the formatting so its my own format and not clickable.

Is there a way to switch it off?

Many thanks

Picture added

date had a link

1

There are 1 answers

0
Atilla Jax On

Turns out I had to set the dataDetectorTypes to none and this fixed the issue.

[cell.textView setDataDetectorTypes:UIDataDetectorTypeNone];