JSONRender
示例
要运行示例项目,请克隆仓库,然后从 Example 目录中首先运行 pod install
。
快照
之前👇🏻
渲染👇🏻
用法
Objc #import <JSONRender/JSONRender.h>
Swift #import <JSONRenderSwift-Swift.h>
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
NSMutableAttributedString *mattrs = [[NSMutableAttributedString alloc] initWithString:@"Example\n" attributes:@{NSFontAttributeName: [UIFont boldSystemFontOfSize:30]}];
[mattrs append:json];
self.textView.attributedText = mattrs;
安装
JSONRender 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod 'JSONRender'
pod 'JSONRenderSwift'
作者
ad0ma, [email protected]
许可证
JSONRender 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。