-(NSMutableAttributedString *) masBlueBoldColorString:(NSString *) theString
{
UIFont * italicSystemFont = [UIFont fontWithName:@"HelveticaNeue-Bold" size:sizeOfFonthighLightSomeStuff];
CTFontRef font = CTFontCreateWithName((__bridge CFStringRef)italicSystemFont.fontName, italicSystemFont.pointSize, NULL);
NSRange rangeHighlight = NSMakeRange(0, theString.length);
NSMutableAttributedString * mutableAttributedString = [[ NSMutableAttributedString alloc]initWithString:theString];
if (font) {
[mutableAttributedString addAttribute:(NSString *)kCTFontAttributeName value:(__bridge id)font range:rangeHighlight];
CFRelease(font);
}
return mutableAttributedString;
}
这段代码有问题......
我希望通过方法返回“字体”。我们有 CFAutoRelease 吗?如果我们根本不需要使用字体会更好