From the course: iOS 14 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: Build a color picker app
From the course: iOS 14 Development Essential Training
Solution: Build a color picker app
(upbeat music) - [Instructor] Here is my solution to the challenge. And of course, as always, yours might be different. The first thing we need to do is modify the green and the blue values in our content view to have that at state call-out, otherwise they cannot be binding. So I'll change that for both of them at state. And then all we need to do is copy and paste this color slider view twice, and then change the reds to green and blue respectively. So green, green, blue, blue and then I'll resume the preview, and that is it. Hit the Play button to get the live preview and drag all the sliders to see the different values. So now you can create any color you want by clicking and dragging the sliders and balancing the color values. And with that, our color picker wrap is complete.
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)
Getting text input with SwiftUI4m 45s
-
(Locked)
Using a slider in SwiftUI5m 26s
-
(Locked)
Creating a slider with a color swatch2m 38s
-
(Locked)
Making a custom SwiftUI view5m 22s
-
(Locked)
Creating a reusable slider component4m 54s
-
(Locked)
Increasing reusability in custom views3m 13s
-
(Locked)
Challenge: Build a color picker app1m 19s
-
(Locked)
Solution: Build a color picker app1m 17s
-
(Locked)
-
-