iOS开源 - 应用信息输出微控制台

sgoc4786 7年前
   <p style="text-align:center"><img src="https://simg.open-open.com/show/35f0b6c843ed69d5b61ff2b765315727.png"></p>    <h2><strong>TinyConsole</strong></h2>    <p>A tiny log console to display information while using your iOS app. Written in Swift 3.</p>    <p><img src="https://simg.open-open.com/show/55c374ba02f74827596b8f6fa4f60a60.png"></p>    <h2><strong>Usage</strong></h2>    <p>Create a TinyConsoleController -Instance and pass your App-ViewController as a rootViewController parameter.</p>    <pre>  <code class="language-objectivec">TinyConsoleController(rootViewController: MyMainViewController())</code></pre>    <h3><strong>Actions</strong></h3>    <pre>  <code class="language-objectivec">TinyConsole.shared.print(text: "hello")  TinyConsole.shared.addMarker()  TinyConsole.shared.clear()</code></pre>    <h3><strong>Gestures</strong></h3>    <ul>     <li>Swipe from Left to Right: Add marker</li>     <li>2 Finger Tap: Add custom log entry</li>     <li>3 Finger Tap: Show Action Sheet to Clear Console and Send Mail</li>    </ul>    <p>Shake to toggle the console view. If you’re using the Simulator, press ⌃ ctrl - ⌘ cmd - z .</p>    <h2><strong>Implementation Example</strong></h2>    <p>Instead of</p>    <pre>  <code class="language-objectivec">func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {      self.window = UIWindow(frame: UIScreen.main.bounds)      self.window?.rootViewController = MainViewController()      self.window?.makeKeyAndVisible()      return true  }</code></pre>    <p>write</p>    <pre>  <code class="language-objectivec">func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {      self.window = UIWindow(frame: UIScreen.main.bounds)      self.window?.rootViewController = TinyConsoleController(rootViewController: MainViewController())      self.window?.makeKeyAndVisible()      return true  }</code></pre>    <p>or checkout the example project included in this repository.</p>    <h2><strong>Installation</strong></h2>    <h3><strong>Carthage</strong></h3>    <p>Add this to your Cartfile:</p>    <pre>  <code class="language-objectivec">github "Cosmo/TinyConsole"</code></pre>    <h3><strong>Manually</strong></h3>    <p>Just drag the source files into your project.</p>    <h2><strong>Hierarchy</strong></h2>    <p style="text-align:center"><img src="https://simg.open-open.com/show/0849c3cfa1f6d9b1ae92491a6024bc56.png"></p>    <p> </p>    <p> </p>    <p> </p>