Chapter 11
Table Row Deletion, Swipe for Actions, Activity Controller and MVC

If you spend too much time thinking about a thing, you'll never get it done. Make at least one definite move daily toward your goal.

– Bruce Lee

Now you know how to handle table row selection. But how about deletion? How can we delete a row from a table view?

It's a common question when building a table-based app. Select, delete, insert and update are the basic operations when dealing with data. We've discussed how to select a table row. Let's talk about deletion in this chapter. In addition, we'll go through a couple of new features to the FoodPin app:

  1. Adding a custom action button when a user swipes horizontally in a table row. This is usually known as Swipe for More action.
  2. Adding a social sharing feature to the app, that enables users to easily share the restaurants.

There is a lot to learn in this chapter, but it's going to be fun and rewarding. Let's get started.

A Brief Introduction to Model View Controller

Before jumping into the coding part, I would like to give you an introduction of Model-View-Controller (MVC) model, which is one of the most quoted design patterns for user interface programming.

I try to keep this book as practical as possible and seldom talk about the programming theories. That said, you can't avoid learning Model-View-Controller, especially your goal is to build great apps or become a competent programmer. MVC is not a concept that applies to iOS programming only. You may have heard of it if you've studied other programming languages, such as Java or Ruby. It is a powerful design pattern used in designing software applications, whether it is a mobile app and a web app.

To continue reading and access the full version of the book, please get the full copy here. You will also be able to access the full source code of the project.

results matching ""

    No results matching ""