O'Reilly logo

Mastering iOS 10 Programming by Donny Wals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Wrapping the feature up

All of the code are in place; you understand multithreading and how callbacks can be used in a multithread environment. You saw the defer statement and how it can be used to execute a block of code at the end of a scope. Yet, if you build and run your app and add a new movie, the rating isn't actually displayed.

The following are the three reasons why this is happening:

  • We aren't setting the movie's rating on the table view cell
  • The network request doesn't succeed due to App Transport Security
  • We're not observing the update

We'll solve these issues in order, starting with the table view cell.

Adding the rating to the movie cell

Currently, the movie table view displays cells just have a title. UITableViewCell has a built-in option ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required