Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

6. Saving, Editing, and Sorting Data: Ev... > Table views have built-in support fo...

Table views have built-in support for editing and deleting

Good news! The table view comes complete with almost everything we need for deleting data. This is behavior that acts a bit like implementing a Save or Cancel button, and a lot of it comes preloaded.

Editing mode adds an Edit button to the Navigation Control in the main view, and when it’s pressed, indicators appear to the left of the table cell that can be selected and deleted like this:

image with no caption

Editing View Construction

Using the view below, write what each part of the editing view does.

image with no caption

Editing View Construction Solution

Using the view below, write what each part of the editing view does.

image with no caption

Long Exercise

The Xcode template we chose for this app comes with a good bit of the code we’ll need, and at this point, you’re pretty familiar with the RootViewController and the table view. We’ll give you some hints on what to implement next, but let you take it from here.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial