'Add new item ...' not selectable


When in edit mode with the sample application for this chapter, we have a row in the table which has a ‘+’ and then the cell text we return is ‘Add new item …’. This works fine if you tap the ‘+’ but unfortunately, if you tap on the row itself nothing happens. Clearly, we would want the same action in either case. Unfortunately, it’s not entirely obvious to me how to fix this … any help would be appreciated.


You could implement tableView:didSelectRowAtIndexPath: to handle what happens when you select that row - which would be to call the same code you would normally call when the plus button is tapped.


Except that method isn’t called when in Edit mode, which is the only time that cell is displayed. I’m sure there’s some other method which filters this, but I’m not sure what it is.



[[self tableView] setAllowsSelectionDuringEditing:YES];



Thanks - just what I was looking for.