Tiny Victories

Well, I finally managed to complete a little test project: an app that lists all of the restaurants in an airport. It’s not something I can submit to the App Store because I don’t actually have a database of airports and their restaurants, (and learning SQLite to create one sounds like a bit too much trouble at this time) but it was a useful exercise in working with table views. Here are some things that I learned about while creating this project:

  • CloudKit (creating record types, adding records from the Dashboard, linking records using CKReferences, and querying for records)
  • Creating dependencies between operations
  • Auto Layout
  • Styling UITableView section headers
  • Using UIActivityIndicatorView
  • Creating custom cells
  • Passing information between view controllers
  • Submitting questions on Stack Overflow :D
  • Lots of Swift syntax

Here’s what the app’s detail view looked like for the one airport that I added:

Airport Restaurants

The problem that I ran into earlier was solved by adding a dependency between my two CloudKit queries: the app needed to finish fetching the restaurants before it finished fetching the names of the sections in order for the table view to populate correctly.

I feel pretty good about moving on to AppCoda’s Intermediate Swift book now. So far, learning Swift and iOS development has been just the right mix of frustrating and fun. Here’s hoping it stays that way!