I want to add a 'new element' cell to my UITableView so that after text typing and tapping 'Enter' the new entry must be created. Something like here but only in the end of the list. How can I do this? In my UITableViewController I use NSFetchedResultsController that handles operations with Core Data.
You will need to amend the tableView delegate and datasource methods to include the extra row:
numberOfRowsInSection
to return the FRC sectionInfo count plus onecellForRowAtIndexPath
to dequeue with the different cell identifier if indexPath.row
is equal to the FRC sectionInfo count (ie. the last row). Configure the cell accordingly.didSelectRowAtIndexPath
to trigger the code to add the new entry.editingStyleForRowAtIndexPath
) to ensure they check the indexPath.row
and handle the extra row appropriately.