From the course: SwiftUI Essential Training
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Challenge: Replace MenuView
From the course: SwiftUI Essential Training
Challenge: Replace MenuView
(upbeat music) - [Instructor] Okay, time for another challenge. We've made the MenuGridView, but kept it in a testing version that won't work with our full app. I'd like to be able to switch between and MenuGridView and MenuItemView, so get ready to do that. We're going to set up MenuGridView to be able to replace MenuView. There's a missing gesture to make that work, so you're going to have to add that as well. And to test you did it right, I want you to add a button that will switch between the two views in our order toolbar. And we'll use a square.grid.3x2 and a list.bullet on the button to indicate them. Now, I only want to see that button when it's right in context, so it should be on the menu mode only. It shouldn't show up when we're in order mode. So go ahead and give that a try and see what you can come up with.
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
-
-
-
-
-
-
-
-
Toggles and steppers6m 8s
-
(Locked)
Pickers6m 10s
-
(Locked)
Moving data in pickers5m 54s
-
(Locked)
Text input7m 1s
-
(Locked)
Lazy grids6m 37s
-
(Locked)
Tap gestures3m 1s
-
(Locked)
Challenge: Favorites grid53s
-
(Locked)
Solution: Favorites grid8m 29s
-
(Locked)
Animation5m 35s
-
(Locked)
Matched geometry3m 44s
-
(Locked)
Challenge: Replace MenuView54s
-
(Locked)
Solution: Replace MenuVIew8m 8s
-
-
-
-