Our review form UI is set up, but we need to make a slight change to it. Right now, we have an image displayed for ratings. We are going to build a custom rating component that we will use in both restaurant details and our Review form.
We will add it to our restaurant details first, and then, when finished, we will add it to the Review form. We want our ratings view to be able to show ratings from zero stars to five stars. We also want the user to be able to select half stars when rating, so it will also need to show half stars.
The first thing we do is start creating our custom UIControl. UIButtons and UISwitches are sub-classes of UIControls, and without getting super technical, we are going to create our control:
- Right-click the Reviews Form folder and select New File.
- Inside the Choose a template for your new file screen, select iOS at the top...