Currently, RestaurantDetailViewController has an outlet, ratingView connected to a ratings view object in the Restaurant Detail screen. It displays a rating of 3.5 stars, but you can't change the rating. To make ratings view respond when touched so that the user can change the rating, you will need to support touch events.
You can learn more about handling touches at https://developer.apple.com/documentation/uikit/touches_presses_and_gestures/handling_touches_in_your_view.
Perform the following steps:
- Click RatingsView.swift in the Project navigator and add the following code after the draw(_:) method:
override var canBecomeFirstResponder: Bool{
return shouldBecomeFirstResponder
}
canBecomeFirstResponder is a UIControl property that determines whether an object can become the first responder. Ratings view needs to become first responder...