Adding the rating to the movie cell

Currently, the movie table view displays cells that just have a title. UITableViewCell has a built-in option to display a title and a subtitle for a cell. Open the Main.storyboard and select the prototype cell for the movies. In the Attributes Inspector field, change the cell's style from basic to subtitle. This will enable us to use the detailTextLabel on our table view cell. This is where we'll display the movie rating.

In MoviesViewController, add the following line to tableView(_:cellForRow:AtIndexPath:), right after you set the cell's title:

cell.detailTextLabel?.text = "Rating: \(movie.popularity)" 

This line will put the movie's popularity rating in a string and assign it as a text for the detail text label.

If you build and run your app now, all movies should have a popularity of 0.0. Let's fix this by resolving our networking issue.