Tool to debug layouts directly on iOS devices: inspect layers in 3D and debug each visible view attributes
DEBUG
build configuration, so it wonโt affect any other kind of the app builds (i.e. RELEASE
)To run the example project, clone the repo, and run pod install
from the Example directory first.
LayoutInspector
is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'LayoutInspector'
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
Version | Description |
---|---|
1.2.1 |
๐ Font attribute added to inspection pane |
1.2.0 |
๐ Shake gesture added to trigger layout inspection ๐งฐ CI configuration upgrade |
1.1.0 |
๐๏ธ Swift 5.0 and ABI stability in da house โ๏ธ New build system activated ๐ Dropped iOS 10 support |
1.0.0 |
๐ Release 1.0 ๐ฎ Test coverage added |
0.2.0 |
Pre-release: Objective-C compatibility ๐ฆ |
0.1.1 |
Pre-release: fixed Lint warnings ๐ถ |
0.1.0 |
Pre-release: initial version ๐ฌ |
Ihor Savynskyi
โ๏ธ [email protected]
๐ Twitter, LinkedIn
LayoutInspector is available under the MIT license. See the LICENSE file for more info.