Posts

Showing posts with the label xcode

CBIntrospect and View Introspector - iOS UIView Hierarchy View debuging tool

Image
Ever wanted to see the entire UIView hierarchy of the screen or window? Yeah, me too. Ever wanted to send messages to the UIView, UITableView, UIScrollView, etc without changing code? Yeah, me too. Ever wanted to manipulate the view's frame or see a verbose description of a UIView's properties? Yeah, me too. Meet CBIntrospect and View Introspector . CBIntrospect is an iOS library which provide tools to debug UIView hierarchies in the simulator and on the device. Introspect tool active View Introspector  is a desktop app which allows you to control CBIntrospect and call methods (send messages) from outside the iOS Simulator. View Introspector It works as you would expect. You can click on an element in the tree to select in the simulator and click on an element in the simulator to jump to it and select it in the tree. It makes finding and manipulating subviews easy (and much more). Its all on GitHub . Enjoy and let me know if it helps.

Combat the WTF in iPhone Development

I thought I would share some information for those that may be new to iPhone development, or may have forgotten. If you see this: __TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION__ popup during a runtime error, check here: Console.app for a more verbose explanation. Most of the time you will find the WTF.

Find the WTD in iPhone Xcode builds!

I'm an avid iPhone developer and I've been developing with Xcode for Mac OS X a while (about 4 years) now. In all my days I have never seen an error from Xcode (even the crazy ones from objc) so sick and twisted that it takes almost an hour to fix. Luckily this fellow ran into the same issue (and posted it). I wasn't using a button, but a "search bar"; and when I removed it everything built just fine. I don't think IB files like multiple "bars". Oh well, back to hard coding GUIs. [error-message] *** -[UIImage encodeWithCoder:]: unrecognized selector sent to instance 0x44d470 [/error-message] I also learned that Xcode or IB doesn't like "lonely" outlets. Meaning, if you assign an instance to an outlet in IB, you better make sure the instance variable is in the corresponding class file. It will build and launch, but crash with some error like: __TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION__ Fun with WTDs (what the deuce).