views:

59

answers:

1

The interface of my iPad app has multiple section boxes (looks similar to this stackoverflow page). I'm new to xcode and iOS programming but have years of web development experience. I would like to know what is the best way to design this.

Should I put everything in one xib file? (section1headerlabel, section1text1,section1text2..)

or should each section be its own xib file? (like server side include in web dev) if so how do I do this?

Any suggestions would be highly appreciated.

+1  A: 

I find that if I'm doing complex things, I generally skip Interface Builder all together and create the view hierarchy using code. I can do better encapsulation this way.

For information on how to do this, check out this q&a: http://stackoverflow.com/questions/1015831/whats-the-best-tutorial-for-iphone-development-sans-interface-builder

BarrettJ
ok then should i have different .m/.h files for each section? or all in one .m/.h file? (and name the variables section1headerlabel, ection1text1,section1text2..) Just trying to make sense of all this from a web dev background.
Yazzmi
Yes, you'd have several .m/.h files implementing subclasses of UIView. You'd have your main UIView subclass which contains other subclasses of UIView (the logical sections of your application).So you'd have a MyApplicationView which contains a HeaderSectionView, MainContentView, and a FooterSectionView. The MainContentView could contain many TopicItemViews that correspond to topics or what have you.
BarrettJ
Thanks you so much. That makes a lot of sense. Could you point me to a tutorial that shows what you just described? loading a subview from a main UIView class programmatically?
Yazzmi