iOS OC 设置字体下划线

//设置字体下划线

NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"查看所有中奖记录"];

NSRange strRange = {0,[str length]};

[str addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:strRange];

[_perfectInfo setAttributedTitle:str forState:UIControlStateNormal];

你可能感兴趣的:(iOS OC 设置字体下划线)