Coder Social home page Coder Social logo

productinfo / tinyconsole Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cosmo/tinyconsole

0.0 2.0 0.0 1.06 MB

πŸš¦πŸ“± A tiny log console to display information while using your iOS app. Written in Swift 3.

License: MIT License

Swift 98.18% Objective-C 1.82%

tinyconsole's Introduction

 text

TinyConsole

Platform iOS Swift 4.2 compatible Carthage compatible License MIT

TinyConsole is a tiny log console to display information while using your iOS app and written in Swift 4.2.

Usage

Wrap your Main ViewController inside of a TinyConsoleController like so:

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

By default, the gestures are configured as follows:

  • Swipe from Left to Right: Add marker
  • 2 Finger Tap: Add custom log entry
  • 3 Finger Tap: Show Action Sheet to Clear Console and Send Mail
  • Shake to toggle the console view. If you’re using the Simulator, press βŒƒ ctrl-⌘ cmd-z.

Implementation Example

Instead of

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    window = UIWindow(frame: UIScreen.main.bounds)
    window?.rootViewController = MainViewController()
    window?.makeKeyAndVisible()
    return true
}

write

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    window = UIWindow(frame: UIScreen.main.bounds)
    window?.rootViewController = TinyConsoleController(rootViewController: MyMainViewController())
    window?.makeKeyAndVisible()
    return true
}

alternatively, check out the example project included in this repository.

Demo

 text

Requirements

  • Xcode 10
  • Swift 4.2
  • iOS 8 or greater

Installation

Add this to your Cartfile:

github "Cosmo/TinyConsole"

Manually

Just drag the source files into your project.

Hierarchy

 text

Contact

License

TinyConsole is released under the MIT License.

tinyconsole's People

Contributors

cosmo avatar ohitsdaniel avatar tiagomartinho avatar mrs- avatar kwongfung avatar readmecritic avatar sebastianvarela avatar freegor avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.