iOS development Part 2 – Editing UITableView

In the last blog post and last chapter (Chapter 10) of the Big Nerd Ranch iOS book, I created an application that displays a list of Possession items in a UITableView control.  I will add the source code and any gotchas I went through in that blog post in a little bit.  For this blog post, we will learn how to edit the content (Possession items) in a UITableView.  The UITableView has an editing property which allows you to move, delete and insert rows.  However, editing mode does not allow the user to edit the content of a row, the description property of the Possession item.

When in editing mode, a header view will appear about the UITableView that consists of 2 buttons, Edit and Add buttons.  Tapping the Edit button will toggle the editing mode of the UITableView.  Tapping the Add button will allow you to add a new Possession item to the UITableView.  Along with the 2 buttons in the HeaderView, there will be a delete button to the left of each row in the UITableView.  After this chapter, that will be all for the UITableView control and on to the UINavigationController control.  Stay tuned for an update with source code and gotchas I went through in implementing the edit functionality for the UITableView.

Part 1: UITableView and UITableVIewController

Part 2: Editing UITableView (current)

Part 3: UINavigationController

Part 4: Camera

Part 5: UIPopoverController and Modal View Controllers

Part 6: Saving, Loading and Multitasking

Part 7: Subclassing UITableViewCell

Part 8: Core Data

Part 9: Localization

iOS development Part 1 – UITableView and UITableViewController





I’ve been learning off and on iOS development by reading two main books, Xcode 4 iOS Development Beginner’s Guide (http://www.amazon.com/Xcode-iOS-Development-Beginners-Guide/dp/1849691304) and iOS Programming The Big Nerd Ranch Guide (http://www.amazon.com/iOS-Programming-Ranch-Guides-ebook/dp/B004Z2NQJQ).  I plan to start a series of blog posts to document what I’ve learned and for others to gain insight as well.  So far in reading a little from both books, they each have very simple sample projects to get your feet wet in learning how Xcode IDE is used, writing objective-c code and MVC design pattern.  Today, I’m going to focus on a more complex and realistic sample application that in the Big Nerd Ranch book.

The sample application starts off in Chapter 10, UITableView and UITableViewController, called Homepwner that basically keeps an inventory of all your possessions.  In the case of a fire or other catastrophe, you’ll have a record for your insurance company.  The Homeowner application will grow over the course of 9 chapters in the book.  The first chapter, Chapter 10, will present a list of Possession objects in a UITableView.  So keep coming back to this blog to follow the progression or leave comments if you have a copy of the Big Nerd Ranch and want to develop along with me through the 9 chapters. 

Part 1: UITableView and UITableVIewController (current)

Part 2: Editing UITableView

Part 3: UINavigationController

Part 4: Camera

Part 5: UIPopoverController and Modal View Controllers

Part 6: Saving, Loading and Multitasking

Part 7: Subclassing UITableViewCell

Part 8: Core Data

Part 9: Localization