Updating the Photo Reviews View Controller Scene to work with Dark Mode

When you build and run your app and go to the Restaurant Detail screen, you'll see that the collection view used to display photos is currently blank, as there are no photos. You'll modify it in the same way you modified the collection view used to display reviews, by changing the colors used by the user interface elements in the storyboard.

Do the following steps:

  1. Click RestaurantDetail.storyboard in the Project navigator. Choose the View for Photo Reviews View Controller Scene in the document outline, and click the Attributes inspector. Set Background to Default, as follows:

  1. Choose the Collection View inside the View in the document outline. Under the View section, set Background to Default, as follows:

  1. Build and run the app, and note that NoDataView is now displaying properly if there are no photos.
  1. Add some reviews and photos, and the collection views should now work fine in Dark Mode as well, as can be seen in the following screenshot:


You've finished updating the Restaurant Detail screen to work with Dark Mode. Congratulations!

There are still two more storyboards to update, though: ReviewForm.storyboard and PhotoFilter.storyboard.

Try updating them on your own, and if you get stuck, you can refer to the completed project files downloadable from the link at https://github.com/PacktPublishing/iOS-13-Programming-for-Beginners.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.236.174