Web developers have long enjoyed the “Inspect Element” features of Firebug and WebKit developer tools to poke around inside their pages at runtime. Patrick Richards, a mobile developer from down under, has created DCIntrospect, a library of visual debugging tools for iOS.
Once added to your project, DCIntrospect listens for shortcut keys to toggle view outlines, nudge views on screen, toggle view visibility, print view properties to the console, and more.
To use, be sure you’ve set the
DEBUG environment variable. It’s also a good idea to target the simulator explicitly, even though DCIntrospect will work on the device as well.
[window makeKeyAndDisplay] // always call after makeKeyAndDisplay. #if TARGET_IPHONE_SIMULATOR [[DCIntrospect sharedIntrospector] start]; #endif
Check out the source on GitHub for a full list of keybindings and instructions on how to customize.
Have comments? Send a tweet to @TheChangelog on Twitter.
Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.