STDebugConsole是iOS应用程序的内置调试控制台。
STDebugConsole将专注于内置控制台功能。
仍在开发中,最简单的示例(标签0.1.1)已准备就绪。
要运行示例项目,请克隆仓库,并首先从示例目录运行pod install
步骤1: 将重定向代码添加到您的应用程序中。
[STDebugConsole setModel:STDebugConsoleModelRedirect];
步骤2: 在任何地方呈现STDebugConsoleViewController。
STDebugConsoleViewController *consoleVC = [[STDebugConsoleViewController alloc] init];
[self presentViewController:consoleVC animated:YES completion:nil];
您可以根据不同的搜索关键字自定义颜色。
例如
[STDebugConsole setColor:[UIColor greenColor] withSearchKey:[Info]];
您还可以自定义默认颜色
[STDebugConsole setDefaultColor:[UIColor grayColor]];
iOS 7.0+
STDebugConsole可通过CocoaPods获得。要安装它,只需将以下行添加到Podfile中
pod "STDebugConsole"
STDebugConsole在MIT许可证下提供。有关更多信息,请参阅LICENSE文件。