I have used this line of code before release of iOS 10.3 ,and worked fine.
NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@
%@",strMRP,strOffer]];
[attributeString addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:12] range:NSMakeRange(0, strMRP.length)];
[attributeString addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:15] range:NSMakeRange(strMRP.length, strOffer.length+1)];
[attributeString addAttribute:NSStrikethroughStyleAttributeName
value:[NSNumber numberWithInteger: NSUnderlineStyleDouble]
range:NSMakeRange(0,strMRP.length)];
But now it is stopped working ,is there any alternate way to do the strike out ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…