Change the color of a link in an NSMutableAttributedString

后端 未结 5 1745
谎友^
谎友^ 2020-12-13 08:15

I have the following code but my links are always blue. How do I cange the color of them?

[_string addAttribute:NSLinkAttributeName value:tag range:NSMakeRan         


        
5条回答
  •  青春惊慌失措
    2020-12-13 08:34

    The link color is the tint color of the label/textView. So, you can change it by changing the tint color of the view. However, this will not work if you want different link colours within the same view.

提交回复
热议问题