views:

49

answers:

1

I made a tab bar application that has only one xib file. If you have have made tab bar applications before then you probably know what I did so I don't really have to explain it. I deleted the two xib files and used MainWindow.xib. I just added views to each tab bar button and assigned view controllers to each of them.

So now I have a tab bar application with multiple views and buttons and only one xib file. Would it be better to have a separate xib file for each view in order to conserve memory? Does it make any difference?

Also, why is the tab bar template so weird? Is it somehow better for resource management? In every tutorial I've seen about making tab bar apps people deviate from the template.

+1  A: 

Yes it is better for resource management to have multiple xibs. When a xib gets loaded it loads all of its content at once. If you have a tab bar application for instance, each of the views associated with a tab will be in memory at the same time, which is inefficient.

However, if your application is simple enough it doesn't really matter, so do whatever is easiest in that case.

DevDevDev