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

thedon1

macrumors 6502a
Original poster
Jun 26, 2010
529
73
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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.