So far, you have created a new UIControl subclass named RatingsView in your project. You have also assigned the class of the view object next to the 0.0 label in the Restaurant Detail screen to RatingsView. Henceforth, an instance of the RatingsView class will be known as a ratings view. In this section, you will add some code to the RatingsView class to make a ratings view display stars. Do the following steps:
- Click RatingsView.swift in the Project navigator.
- Type the following text under the RatingsView class declaration:
let imgFilledStar = Imag
- The autocomplete menu will appear. Choose Image Literal, as shown in the following screenshot:
- You'll see a placeholder graphic. Double-click ...