Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

theagentx

macrumors newbie
Original poster
May 3, 2009
27
0
Fort Lauderdale, FL
Just a quick question:) If this is too stupid, let me know....

Let's say I have created a simple TableView in IB for an iPhone application created off of the Windowed Application template in Xcode...

I have a table View with a tool bar at the top and a "Done" button in it.

In IB there is a feature "Create Class Files"

Lets say I use this and it will create class file in Xcode for: on for the button, one for the tool bar, one for the Table...etc...

Is this good practice to do this?
Is it bad practice?
Should they be in separate classes?
 
well, I don't see a reason why, for example, you would need to subclass the button. and if you don't subclass it you don't need a class file for it. if you DO subclass it for some reason, I would create a .m and .h file for that button. putting multiple classes in one file gets pretty confusing
 
I always work in the other direction. I create files and add outlets, actions, properties in Xcode. I obviously edit the UI in IB.

I think you'll be happier going from Xcode to IB for textual things.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.