To XIB or not to XIB?

I'd like to know if anyone could tell me the recommended way to build the UI for iPhone applications. Should I use Interface Builder to layout the views or should I implement them all programmatically? I remember that I read somewhere that using XIB files is more resource hungry and therefore costs performance. Since iPhone applications have to deal with limited resources is it better to implement the UIs "by hand"?

Thanks for any answers
Jens

MacBook Pro, Mac OS X (10.5.4)

Posted on Aug 19, 2008 10:23 AM

Reply
4 replies

Aug 19, 2008 12:00 PM in response to misterX

It's easier/faster to get a UI looking good with Interface Builder and if you're worried at all about localization issues (i.e. translating to other languages) I tend to think it's a must since the XIBs can be localized.

There is a slight penalty on load of a XIB but I've not found this to be significant (yet). By using multiple XIB files (i.e. one for each view) you gain fairly fine-grained tunability of your memory usage (i.e. only those XIBs that the user is actually using are loaded).

rob.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

To XIB or not to XIB?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.