Pages

Monday, January 19, 2009

Interface Builder: Remember to hook up the view to the ViewController's FileOwner view outlet

I don't know if I like or despise Interface Builder.  Most of the time it's an effective tool to building UI for the Mac and the iPhone.  Every so often, I'm completely confounded by it's tediousness.  Case in point: The ViewController's File Owner has an outlet for the view.  If you have one single view in your XIB, you still need to make a connection between the File Owner's view and the View object in the XIB file.  I spent significant time today trying to figure out why a multi-view iPhone example that I was working on kept throwing exceptions after I started adding the subviews to the codebase.  To me, Interface Builder seems a bit opaque; you never really know if everything is wired together properly.  I'm sure experience will help alleviate this type of issue cropping up in the future, but from my very limited exposure to the Xcode/Interface Builder tooling, it seems like the tooling could use a revamp to make things much more user friendly.  I believe the precursor to Eclipse, Visual Age for Java|Smalltalk had a similar UI wiring scheme, but with a much easier view of all the existing wirings.  Something similar would be helpful in Interface Builder.  


UPDATE on February 3, 2009: Bill Dudney has seen this phenomenon in his trainings and blogs about it here, with screenshots.

No comments:

Post a Comment