From the course: Apple watchOS 7 App Development Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Solution: Ratings page - watchOS Tutorial
From the course: Apple watchOS 7 App Development Essential Training
Solution: Ratings page
(energetic electronic music) - All right, let's do some solutions. We've got a couple of steps to do here. So I'm going to start by stopping the app as it is, and we're going to need some new files here. So we're go to; file, new, file, Swift UIView, and make sure we're going to the extension, and we'll make a ratings view. We go ahead and create that, and there's the ratings view. Now in the ratings view, I'm going to be using an hstack here. So, and when we do this to make an hstack and then repeat the star in the hstack. So I'm going to need a count first of all, here. So let's do a var, and we'll call it count, and it's best to make that a state variable. So I'm going to change this to state, that will be changing values, and so we're going to be changing that to a var. And now I'm going to come down here the text, and I'm going to just embed hstack, and then delete the text, 'cos we're not using text. I'll put a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Starting a SwiftUI watch project by extensions3m 48s
-
(Locked)
SwiftUI on watchOS3m 45s
-
(Locked)
Copy a phone interface5m 36s
-
(Locked)
Add a watch interface3m 57s
-
(Locked)
Add previews and scrolling1m 53s
-
(Locked)
Presenting navigation3m 20s
-
(Locked)
Add buttons and dismissals5m 33s
-
(Locked)
Challenge: Ratings page39s
-
(Locked)
Solution: Ratings page7m 28s
-
(Locked)
-
-
-
-
-