Maintain custom attributes when replacing attributed text on UITextView
<p>I have a editable UITextView that gets loaded with an attributed String. This attributed String is loaded with custom attributes set by the app. For this reason I always add these custom attributes to the <code>typingAttributes</code> of the textView. </p>

<p>Whenever I'm typing text it works as expected, the text that is added has the custom attributes set, but whenever I use the predictive suggestions to replace a word, the whole word is set with no custom attributes.</p>

<p>As far as I know, every time the attributed text is set programmatically, the <code>typingAttributes</code> are automatically cleared. So it seems that when a predictive suggestion is selected, the text is set programmatically and for this reason I lose all my custom attributes.</p>

<p>Is there any way around this?</p>