4 steps to add and remove data:1, now the Navigation view to add a button, can be the system comes with the edit button Editbuttonitem2. Implementation method Let the table view that will perform the delete add operation be in edit State3. Specify which rows in the table view can be in the edit state, and all rows can be edited by default4, specify the editing style, whether delete or add, this method if not rewritten, the default is to delete the style5, whether it is deleted or added, this method is the core method of operation, when you click the Delete/Add button, what needs to be done, how to complete the deletion or add the operationStep: 5.1 Table View start update5.2 Write code according to different editing styles5.3 Table View End Update6, if you want to delete the button is a custom button, it is necessary to implement the following method:Move the table view:1. Open the edit state of the table view first2. Specify which rows can be moved3. What to do after the move is completed, how to complete the mobile4, if there is a partition, how to let him do not move across the group method
UITableView data additions, deletions, moves