From the course: Complete Guide to SwiftUI

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Challenge: Ratings view

Challenge: Ratings view

(upbeat music) - Okay, it's time for your second challenge. With what we've learned so far, we're going to make a new view called RatingsView. RatingsView will have an integer parameter that rates a menu item on a number from 1 to 6. So for example, RatingsView (rating:4) would be four filled circles and two empty circles. And you're going to use the SF Symbols circle and fork.knife.circle.fill to do this. And once you create the RatingsView, replace the description in MenuRowView with the rating. Okay, go ahead and give that a try and see what you can do.

Contents