I have a table with items in it and I want a way to add items to that list when the user clicks on a UIBarButtonItem by filling in two fields with a string and an integer. Originally I tried a UIAlertView with text fields on it, which turned out to be a no-no.
Would you create a table view with buttons, and then have those buttons move the user to a different view with a text field, like adding a new alarm in the “Clock” app, or would you create cells with text fields, like when adding a new contact in the “Contacts” app?
EDIT: I’ve created a separate view that pops up when you click the button. I’ve added a table view with 2 entries (Accessory view) and I would like these buttons to be textfields. Is there a way to do this? Am I doing it the right way? Should I be doing it another way?
Typically you would add a new item by having an add button on your navigation bar that when touched, presents a modal view with a form for the user to fill in.
But there is no single correct way of adding items. It will depend very much on the purpose and style of your app. I suggest reading the Human Interface Guidelines – http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/MobileHIG.pdf – provided by Apple and also look at other apps for examples of how to do it.