I'm trying to make a tableview in which a user can enter data into it. I want it to look almost identical to the contact app on the iPhone when you are creating a new contact.
I posted my code below.
Next to the title text, I would like the user to enter in a title, next to description text, I would like the user to enter in a description, next to the time, I would like the user to enter in a time, and next to the location text I would like the user to enter in a location.
I am completely lost on how to do this and any help would be greatly appreciated!
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
if(indexPath.row == 0) {
cell.textLabel.text = @"Title";
}
else if(indexPath.row == 1) {
cell.textLabel.text = @"Description";
}
else if(indexPath.row == 2) {
cell.textLabel.text = @"Time:";
}
else if(indexPath.row == 3) {
cell.textLabel.text = @"Location:";
}
// Configure the cell...
return cell;
}