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"?
I would recommend IB as well. It does depend on the size/type of your application. If it's using heavy OpenGL then you probably would do everything programmatically.
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).
Do whatever's easier - If I have a simple table view with a navigation controller, that's only a couple lines of code, so I do it that way. Same thing with a main screen with a tab bar, but a Nib is fine too.
Something more complex - use nib files.
My current app has 7 nib files and 3 screens created programmatically.
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.