Instead of having a '+' sign to insert a new row..is there a way whereby i can insert a new row on my existing table?meaning to display the "Insert new row" on the last row of my uitableview..and also is it possible to edit the string to different name rather then just "Insert new row".
A:
Sure,
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
In the DataSource just create extra cell for the last index. You will also need to make sure that:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
Returns +1 to account for the 'Insert Cell'.
When this cell is selected just modify your underlying model to create a new object and reload the table.
willcodejavaforfood
2010-02-17 13:57:42