Setting up our rating control 

We are now going to set up our rating control:

  1. Open up ReviewForm.storyboard.
  2. In the object library of the Utilities panel, type view in the filter field.
  3. Delete the image with the five empty stars.
  4. Then, drag out a View into the cell with the empty stars.
  5. Select the View and, in the Size inspector, update the following values:
  1. Next, in the Identity inspector, update the Custom Class to RatingsView and hit Enter.
  2. Next, select the view inside of the view and then select the Pin icon and enter the following values:
  1. Click Add 3 Constraints.
  2. Next, click the Align icon and enter the value of Horizontally in Container as 0 (should be checked).
  3. Click Add 1 Constraint.
  4. Select the label that says Tap a Star to Rate.
  5. Then, select the Pin icon and enter the value of Top as 1.
  6. Click Add 1 Constraints.
  7. Next, select the Restaurant View Controller, then in the Identity inspector, update the Custom Class to RatingsView and hit Enter.

Our form is now updated; let's create our controller next.