Chapter 19. Displaying details of your LioN

This chapter covers

  • Optionals
  • Typecasting
  • Optional binding

If you open the Contacts app on your iPhone, you’ll notice that your contacts are displayed using a table view, and individual contacts are in a tableView cell. If you select one of those cells, another page loads with the details of that contact, and you can edit the contact if you choose. You’re going to add the same type of functionality to your LioN app now.

19.1. Capturing the tapped row index

The first thing you need to do in order to display the details of a specific row is to capture which row the user tapped. If only there was a function that already captured this information! Oh, wait—there is. Open your MainViewController ...

Get Anyone Can Create an App: Beginning iPhone and iPad programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.