Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've been using Xcode and building iPhone apps for two months, but I'm finding it really hard to grasp good application design. I always face problems—like you can't put your tabbarcontroller in another custom viewcontroller, for example—that 'sometimes', of course, would work if you did the creation of the views/viewcontrollers programmatically.

So I don't know if I should start writing the creation of my objects or use Interface Builder. What are your experiences?

share|improve this question
2  
I recommend reading the site's FAQ page. There you'll see 6 guidelines to asking questions and you'll then see that "poll" questions don't really work on this site. Please edit your question once you read the guidelines. –  Walter Jan 10 '11 at 18:58
    
I think poll questions are offtopic, even here. Asking about the pros and cons to elicit good answers would be different. –  Matthew Read Jan 10 '11 at 18:58
    
i've been reading why polls don't work on meta.stackoverflow.com/questions/4510/… and i thought on programmer.stackexchange it would work, and i specified how it should be answered. I'm going to read the faq now –  LolaRun Jan 10 '11 at 19:00
    
well i think that my question is statistical and informative for people who wants to know which the best approach on creating their view/controllers for iphone apps. it falls in 'Development methodologies' i think. And the constructiveness will appear in the comments. And it's really not "are more than just mindless social fun." Actually it's the result of anger and frustration while working in this technology. There's 0 fun in it. –  LolaRun Jan 10 '11 at 19:05
3  
Stack Exchange is a question-and-answer network of sites, not a polling system, and there are no sites within the Stack Exchange system that allow you to define the rules for your own question. I've edited your question to fit the Stack Exchange way. –  user8 Jan 10 '11 at 19:26
show 7 more comments

5 Answers

up vote 1 down vote accepted

See my question here http://stackoverflow.com/questions/2367111/when-should-i-use-the-interface-builder

General response: use IB when you can. It's good.

share|improve this answer
add comment

Interface builder is much better to use when you can. There are many reasons for this. Most importantly, InterfaceBuilder abstracts ALL code from anyone looking at it. My grandma can generally make her way around IB. That makes it easier to maintain.

Use IB if you can. It's dumb not to. Nobody likes to read and maintain interface code in -viewDidLoad or -awakeFromNib

share|improve this answer
    
well it's not that easy, but yeah, now i'm fine with interface builder. BUt the problems have started to occur with added complexity, where there's so many rules and constraints about the hierarchy of views and viewcontrollers. A lot has started to get offline. like not receiving events if they are in a certain level of a controller. Too much application architecture constraints, make you want to bypass the rules posed by using ib, and relying on manual control. don't you think? –  LolaRun Jan 10 '11 at 21:37
    
To an extent, I agree. Obviously, there are times when IB simply cannot accomplish the task at hand. However, more times than not, MOST of the work can be done in IB. Therefore, it should be used. In my book, the less code, the better. –  DexterW Jan 10 '11 at 22:06
    
+1 for maintenance, especially. "I need to align this textbox with that one," takes moments in IB, even if you're entirely unfamiliar with the project. If the textboxes were created in code even someone familiar with the code but hasn't seen it in a few months will take many times as long, and that's just a simple example. –  Matthew Frederick Jan 11 '11 at 9:46
add comment

I always was just playing with some new IB, and then creating the UI programmatically. Why? Better precision, total control, more fun

share|improve this answer
    
I do the same. Use IB for RAD mockups. Then recreate the UI programmatically when I want to do fine tuning, add features, animation, etc. –  hotpaw2 Jan 21 '11 at 19:39
add comment

It depends on what you are trying to achieve. I usually go with Interface Builder first, but I'm not afraid to jump to code if need be.

Interface Builder helps in creating solid, HIG-compliant interfaces with minimal coding, iOS clearly likes it when it's used over code, and I think it should be every iOS dev's first choice. But it does only go so far in working with custom functionality (like carrying toolbars and the like over from one view to another).

It's a lot of work to build interfaces with code, but the results can sometimes be better suited to your project's specs.

share|improve this answer
add comment

IB helps you be productive when your interfaces use standard interfaces in a standard way connected to standard models via standard bindings or targets/actions.

That's a lot of trouble when you want the behavior of the UI to be more organic, intuitive rather than just connected. You'll have to add other controllers or models to synthesize one semantic UX model out of several objects, and custom classes just don't play well within IB. Not unless they're a sub-class of a standard AppKit class or you tackle the side job of adding more code to get your custom classes hosted within IB.

Also, with the newly opened Mac AppStore hosting so many apps with "delicious" interfaces, you don't want to have a plain "standard" interface.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.