我使用TTTAttributedLabel来显示标签中的链接。现在,我只想更改链接的字体大小。任何指南
发布于 2013-04-11 21:43:48
TTTAttributedLabel有一个属性linkAttributes,它将应用于每个链接:
TTTAttributedLabel *someLabel;
NSMutableDictionary *baseAttributes = [NSMutableDictionary dictionary];
UIFont *baseFont = [UIFont systemFontOfSize:14.0];
CTFontRef baseFontRef = CTFontCreateWithName((__bridge CFStringRef)baseFont.fontName, baseFont.pointSize, NULL);
baseAttributes[(__bridge NSString *)kCTFontAttributeName] = (__bridge id)baseFontRef;
CFRelease(baseFontRef);
someLabel.linkAttributes = baseAttributes;https://stackoverflow.com/questions/15949897
复制相似问题