What type of table should I use to collect data?

Discussion in 'iOS Programming' started by thedon1, May 26, 2014.

  1. thedon1 macrumors 6502

    Joined:
    Jun 26, 2010
    #1
    I'm looking to learn a few things about tables in Xcode and have an idea for an app but am not quite sure what the best tool to use within Xcode is.

    I basically need to have a table in my app where a row would be split into 4 columns, 3 which would require a user input and the 4th that would be calculated.

    It would need a + button at the button so the user could add a new row.

    I don't want the table to be the whole view but instead a part of it.

    Any ideas what the best thing to use would be? I'm really not sure about the row being split into 4 compartments.
     
  2. xStep macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #2
    Most often people use UITable views with custom cells for such UI interaction. Four fields on one row on an iPhone in portrait mode may be tight, so people play with multiline layouts for the cell. I suppose you could also allow for horizontal scrolling but that doesn't sound like a UI I'd like to deal with as a user.

    For the data storage, you could use CoreData. It even has a feature to handle that fourth calculated value. If your needs are small, you could simply archive your model objects, use flat files, or use plists. If you have SQL experience, you could use SQLite directly.

    BTW, the 'add' button usually goes on the top left on the navigation bar. See Apple's Contacts or Notes apps. Pay attention to what changes on the nav bar after you tap that button. Their Mail app effectively has that button on the lower tab bar.
     

Share This Page