Hi, first let me start by saying I'm pretty new to iPhone, so I apologise for my ignorance.
I've got a UITableView that I want to add new items to. When the add button is pressed, I want a modal screen to slide up where the user types in the text for the new item.
I've been reading from Apple's Table View Programming Guide for iPhone, and they have an example that supposedly does what I want:
- (void)addItem:sender {
// To add an item, display a modal view with a text field.
if (itemInputController == nil) {
itemInputController = [[ItemInputController alloc] init];
}
// Use a navigation controller to provide a customizable navigation bar with Cancel and Done buttons.
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:itemInputController];
[[self navigationController] presentModalViewController:navigationController animated:YES];
[navigationController release];
}
However they don't explain anywhere what itemInputController is. As far as I can determine it is supposed to give me a modal view with a single text field, and a navigation bar with Cancel and Save in it. Am I supposed to create this view myself in Interface Builder? Or is it a standard thing I need to import somehow? Can anyone help me decipher this, or alternatively show me another way to get this working?