iOS 下划线不显示问题

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不显示...

你可能感兴趣的:(iOS 下划线不显示问题)