Chapter 10
Interacting with Table Views and Using UIAlertController

There is no learning without trying lots of ideas and failing lots of times.

- Jonathan Ive

Up till now, we only focus on displaying data in a table view. I guess you are thinking how we can interact with the table view and detect row selections. This is what we're going to discuss in this chapter.

We'll continue to polish the FoodPin app, which we have built in the previous chapter (http://www.appcoda.com/resources/swift5/FoodPinCustomTable.zip), and add a couple of enhancements:

  • Bring up a menu when a user taps a cell. The menu offers two options: Call and Check-in.
  • Display a heart icon when a user selects Check-in.

Through implementing these new features, you will also learn how to use UIAlertController, which is commonly used to display alerts in iOS apps.

Figure 10-1. Sample alerts in Facebook and iTunes apps
Figure 10-1. Sample alerts in Facebook and iTunes apps

Quick note: This class replaces the UIActionSheet and UIAlertView classes for displaying alerts in iOS 8 (or up).
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 ""