Using "Create Class Files" in IB

Discussion in 'iOS Programming' started by theagentx, May 10, 2009.

  1. theagentx macrumors newbie

    theagentx

    Joined:
    May 3, 2009
    Location:
    Fort Lauderdale, FL
    #1
    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?
     
  2. BlackWolf macrumors regular

    Joined:
    Apr 9, 2009
    #2
    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
     
  3. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    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.
     

Share This Page