RichStyleLabel 0.0.1

RichStyleLabel 0.0.1

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布上次发布2014年12月

liaojinxing 维护。




  • liaojinxing

是 UILabel 的子类,具有丰富的样式,例如自动检查链接、支持正则表达式。

它支持

  • 在文本中自动检查链接,并应用链接样式。
  • 将用户定义的属性应用于正则表达式匹配结果。

examle

安装

  • 将源文件拖放到您的项目中。
  • 或使用 Cocoapods。以下是一个示例 Podfile
pod 'RichStyleLabel'

示例

RichStyleLabel *regexLabel = [[RichStyleLabel alloc] initWithFrame:CGRectMake(0, 200, 320, 100)];
NSDictionary* redTextAttributes = @{ NSForegroundColorAttributeName : [UIColor redColor]};
[regexLabel setAttributedText:@"123Hello, world! " withRegularPattern:@"^[0-9]+" attributes:redTextAttributes];

查看项目以获取更多详细信息。

许可证

RichStyleLabel 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。