TinyConsole 1.3.2

TinyConsole 1.3.2

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布日期最后发布日期2016年12月
SwiftSwift 版本3.0
SPM支持 SPM

Devran Cosmo Uenal 维护。




 text

TinyConsole

A tiny log console to display information while using your iOS app. Written in Swift 3.

Usage

Create a TinyConsoleController-Instance and pass your App-ViewController as a rootViewController parameter.

TinyConsoleController(rootViewController: MyMainViewController())

Actions

// 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()

Gestures

  • 从左向右滑动: 添加标记
  • 双指点击: 添加自定义日志条目
  • 三指点击:显示动作表单以 清空控制台发送邮件
  • 摇晃以切换控制台视图。如果你使用的是模拟器,请按 ⌃ ctrl-⌘ cmd-z

Implementation Example

而不是

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
}

或者检查此存储库中包含的示例项目。

Demo

 text

Requirements

  • Xcode 8
  • Swift 3
  • iOS 8 或更高版本

Installation

手动

只需将源文件拖放到你的项目中。

Hierarchy

 text

Contact

  • Devran “Cosmo” Uenal
  • 推特: @maccosmo

许可证

TinyConsole 是在 MIT 许可证 之下发布的。