Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TTTAttributedLabel link font changing when UIAlertView presents

I have a weird problem: I have a TTTAttributedLabel with a link in it:

enter image description here

The name "bryan"is the link. When a UIAlertView is presented over this label, the font of the link changes:

enter image description here

As you can see the link lost its font size and weight. Has anyone seen this before? Is there a separate font attribute for "link in background" or something? Thanks.

like image 501
bcattle Avatar asked Oct 21 '15 00:10

bcattle


1 Answers

This happens when you create a link, then set linkAttributes. When the UIAlertController is presented the link becomes "inactive", and it reverts back to a default style. Setting inactiveLinkAttributes fixed this.

Source: https://github.com/TTTAttributedLabel/TTTAttributedLabel/issues/542

like image 75
bcattle Avatar answered Nov 12 '22 17:11

bcattle