views:

94

answers:

4

I have seen some people who refuse to use Interface Builder and prefer to make everything using code. Isn't this a bit tedious and doesn't it take longer? Why would people do that?

A: 

Possibly because the Interface Builder is another tool to understand. Also, it's useful to know how to do things programmatically in case nibs don't give you enough functionality.

Joren
I like using xibs as "defaults" that can be overridden in code for the reason you bring up.
Andrew
+1  A: 

Sometimes you want to do something that the UI builder can't quite handle (these situations aren't common, but they do come up now and then). Sometimes you may feel you have better control over what's happening when you write the code yourself. Me, I prefer to let the UI builders do it as much as possible, but sometimes it doesn't always work that nicely, and I sometimes have had to write the code myself.

FrustratedWithFormsDesigner
+1  A: 

Some people don't like mixing code functionality in interface designs. Another example is when flash devs would include lots of code snippets directly in the stage (fla files), rather than in separate .as files. With xib it's not as big of a problem, since they are xml and can be merged quite easily when using source control. I personally like using xib's because we have a team of devs and designers -- splitting up the work load is nice. The designers can easily port their photoshop/fireworks designs into xibs and we can focus on the functionality.

Andrew
I don't see how this is relevant. You *can't* write code in Interface Builder.
Chuck
By "code" I mean things that you would otherwise set in code. Like a button's graphic. Or the size of an object.
Andrew
+3  A: 

This is usually a holdover from working in other environments with other UI builders. A lot of UI builder programs are viewed as newbie hand-holding at best and outright harmful at worst. Interface Builder is unusual in that it's actually the preferred way to create interfaces for the platform.

Chuck
A UI builder that *works* makes UI development faster and maintains consistency in generated code and in the generated UI. As hand-holding goes, I think newbies should *not* be using UI builders, until they have some understanding of the underlying code that is generated - and the best way to understand it is to write it by hand. ;)
FrustratedWithFormsDesigner