Creating a custom color

In the previous chapter, you used a custom color for the Launch screen. You can actually create custom colors and assign them a name in the Assets.xcassets file. This makes them really easy to reuse and ensures consistency in your project. In this section, you will create a custom color and assign it to the collection view cells. Follow these steps to do so:

  1. Click on the Assets.xcassets folder in the Project navigator and right-click in the clear white space of the document outline, as shown in the following screenshot:
  1. Choose New Folder from the pop-up menu:
  1. Change the name of the folder to colors:

If you make ...

Get iOS 13 Programming for Beginners - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.