测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布日期最后发布日期 | 2016年12月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Devran Cosmo Uenal 维护。
A tiny log console to display information while using your iOS app. Written in Swift 3.
Create a TinyConsoleController
-Instance and pass your App-ViewController as a rootViewController
parameter.
TinyConsoleController(rootViewController: MyMainViewController())
// Print message
TinyConsole.print("hello")
// Print messages any color you want
TinyConsole.print("green text", color: UIColor.green)
// Print a red error message
TinyConsole.error("something went wrong")
// Print a marker for orientation
TinyConsole.addMarker()
// Clear console
TinyConsole.clear()
添加标记
添加自定义日志条目
清空控制台
和 发送邮件
而不是
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = MainViewController()
window?.makeKeyAndVisible()
return true
}
编写
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = TinyConsoleController(rootViewController: MainViewController())
window?.makeKeyAndVisible()
return true
}
或者检查此存储库中包含的示例项目。
只需将源文件拖放到你的项目中。
TinyConsole 是在 MIT 许可证 之下发布的。