/Playground

Library for modifying layout properties in a live app.

Primary LanguageObjective-COtherNOASSERTION

Playground

Playground is a utility that lets you inspect and modify layout properties while your app is running. Enable Playground with a gesture, update your layout and print changes to the console. When running your app in the Simulator, there’s support for using the keyboard to modify layout properties.

Playground screenshot

Example project: Playground Demo

Usage

Copy all the files in the Playground source folder to your project. If you’re using ARC, remember to add the -fno-objc-arc flag to the added files. To integrate Playground into your app:

self.window = [[PGWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

You can enable/disable Playground with a two finger long press gesture or define your own by setting the activateGestureRecognizer property.

Keyboard Mapping

Move view← → ↑ ↓
Decrease widtha
Increase widthd
Decrease heights
Increase heightw
Move left in view hierarchyj
Move right in view hierarchyl
Move up in view hierarchyi
Move down in view hierarchyk
Display properties in consolep

License

Apache License, Version 2.0
by Scott Tran
Twitter: @scott_tran