nsmutablestring

NSStrikethroughStyleAttributeName , How to strike out the string in iOS 10.3?

╄→гoц情女王★ 提交于 2019-11-26 22:02:53
问题 I have used this line of code before release of iOS 10.3 ,and worked fine. NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@",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)];