iOS 文本标签:CoreTextLabel

jopen 9年前

使用 CoreTextLabel 可以使用自定义字体,颜色来绘制NSAttributedString 或者 HTML,支持 iOS (>= 5.0) 应用。同时也支持 numberOfLines 和 truncation (NSLineBreakByTruncatingTail)。

示例:

CoreTextLabel* label  = [[CoreTextLabel alloc] initWithFrame:frame];  label.html = htmlString;  [label sizeToFit];  [self.view addSubview:label];

iOS 文本标签:CoreTextLabel

项目主页:http://www.open-open.com/lib/view/home/1423662518545