Home

Awesome

Introduction

CI Status Version License Platform

<a href="https://github.com/isavynskyi/LayoutInspector/blob/master/LayoutInspector_demo.gif"><img src="https://github.com/isavynskyi/LayoutInspector/blob/master/LayoutInspector_demo.gif" title="LayoutInspector demo"/></a>

Features

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

LayoutInspector is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'LayoutInspector'

Usage

Layout inspection could be trigger:

LayoutInspector.shared.showLayout()
LayoutInspector.shared.setAutoTrigger(.screenshot)
LayoutInspector.shared.setAutoTrigger(.shake)

Swift

import LayoutInspector

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        LayoutInspector.shared.setAutoTrigger(.screenshot)
        return true
    }
}

Objective-C

@import LayoutInspector;

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [LayoutInspector.shared setAutoTrigger:AutoTriggerScreenshot];
    return YES;
}

@end

Changelog

VersionDescription
1.2.1📝 Font attribute added to inspection pane
1.2.0👋 Shake gesture added to trigger layout inspection <br/> 🧰 CI configuration upgrade
1.1.0🏎️ Swift 5.0 and ABI stability in da house <br/> ✈️ New build system activated <br/> 🔌 Dropped iOS 10 support
1.0.0🎉 Release 1.0 <br/>👮 Test coverage added
0.2.0Pre-release: Objective-C compatibility 👦
0.1.1Pre-release: fixed Lint warnings 👶
0.1.0Pre-release: initial version 🎬

Author

Ihor Savynskyi
✉️ wadedunk08@gmail.com
🌎 Twitter, LinkedIn

License

LayoutInspector is available under the MIT license. See the LICENSE file for more info.