在iOS13,如果你是先给button设置了setAttributedTitle,再调用setTitleColor,那么标题就会变成黑色,你要做的是通过下面的方法设置button title的颜色
[attributedString addAttribute:NSForegroundColorAttributeName value:titleColor range:NSMakeRange(0, attributedString.length)];
在iOS13,如果你是先给button设置了setAttributedTitle,再调用setTitleColor,那么标题就会变成黑色,你要做的是通过下面的方法设置button title的颜色
[attributedString addAttribute:NSForegroundColorAttributeName value:titleColor range:NSMakeRange(0, attributedString.length)];