所以我正在尝试使用以下代码创建一个属性字符串
color = [TGAPublic blue];
finalMessageString = [NSString stringWithFormat:@"%@ is now following you!",variable1];
attributedString = [[NSMutableAttributedString alloc] initWithString:finalMessageString ];
[attributedString beginEditing];
[attributedString addAttribute:NSFontAttributeName
value:[TGAPublic RobotoLightwithSize:10]
range:[finalMessageString rangeOfString:finalMessageString]];
range1 = [finalMessageString rangeOfString:variable1];
[attributedString addAttribute:NSFontAttributeName
value:[TGAPublic RobotoBoldwithSize:15]
range:range1];
[attributedString endEditing];
代码[TGAPublic blue]
返回UIColor,[TGAPublic RobotoLightWithSize:10]
返回UIFont大小10.但是,这些似乎不会影响实际的属性字符串......