我有一个如下字符串:
NSString *a = @"* This is a text String \n * Followed by another text String \n * Followed by a third"
我需要将其打印为三行。现在,我希望将其中的 Asterix 点加粗。所以我尝试了:
NSMutableAttributedString *att = [[NSMutableAttributedString alloc] initWithString:a];
[att addAddtribute:NSFontAttributeName value:SOMEBOLDFONT range:[a rangeOfString:@"*"]];
但这只会加粗第二个和第三个星号。我如何让他们都大胆?