BBCodeString 0.2.2

BBCodeString 0.2.2

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布时间上次发布2016年1月

Miha Rataj 维护。



BBCodeString 是一个简单的库,它使您能够从 BB 代码字符串中创建 NSAttributedString 对象。

使用方法

使用示例

NSString *bbCode = @"[user id=\"42\"]Mary Jones[/user] sent file [file id=\"23\"]Report.pdf[/file].";

BBCodeString *bbCodeString = [[BBCodeString alloc] initWithBBCode:bbCode andLayoutProvider:self];
NSAttributedString *myString = bbCodeString.attributedString;
You can simply set visual attributes for each BB code element by setting layout provider.

要运行示例项目,首先克隆仓库,然后从 Example 目录运行 pod install

要求

安装

BBCodeString 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod "BBCodeString"

作者

Miha Rataj, [email protected]

许可证

BBCodeString 根据 MIT 许可证提供。有关更多信息,请参阅 LICENSE 文件。