为UILabel设置NSStrikethroughStyleAttributeName在iOS 10.3中不起作用

时间:2017-03-30 05:21:44

标签: ios objective-c ios10.3

这是示例代码:

NSMutableAttributedString * str=[[NSMutableAttributedString   alloc]initWithString:@"$198"];   

[str addAttribute:NSStrikethroughStyleAttributeName value:@2 range:NSMakeRange(0,[str length])];  

yourLabel.attributedText = str;

0 个答案:

没有答案