NSMutableAttributedString *att = [[NSMutableAttributedString alloc] initWithString:@"如何快速收集"];
[att addAttributes:@{NSForegroundColorAttributeName: UIColor.redColor,
NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle),
NSUnderlineColorAttributeName: UIColor.redColor,
NSBaselineOffsetAttributeName: @(5)}
range:NSMakeRange(0, att.string.length)];
[feedback setAttributedTitle:att forState:UIControlStateNormal];
要使用NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle)
只使用NSUnderlineStylePatternSolid不显示...
网友评论