From the course: Complete Guide to SwiftUI
Unlock this course with a free trial
Join today to access over 24,600 courses taught by industry experts.
Challenge: Favorites grid
From the course: Complete Guide to SwiftUI
Challenge: Favorites grid
- [Instructor Time for a double-header challenge. You're getting two challenges, one right after the other to handle two different issues in bringing menu grid view with a favorites grid to the app. In this first challenge, you'll have to make the favorites view with a five-column grid. When you double-tap a menu item in grid view, the item will disappear from the menu and appear in the favorites. On a long press on favorites, it will remove itself from favorites and go back to the menu. On both grids, you want to tap to select. To help you out, I'm giving you two files you'll find on the downloads under assets. So you'll find 'em here, and just drag in FavoriteCellView and Favorite.swift into your code, and copy files to destination. And we can take a look at them. We could start here with the FavoriteCellView, and you'll see that it's nothing really that special. It's pretty much just an image that we're getting from the menu item ID like we do right up here. And we're just checking…
Contents
-
-
-
-
-
-
-
-
(Locked)
Toggles and steppers6m 8s
-
(Locked)
Pickers6m 10s
-
(Locked)
Moving data in pickers5m 54s
-
Text input7m 1s
-
(Locked)
Lazy grids6m 37s
-
(Locked)
Tap gestures3m 1s
-
(Locked)
Reacting to changes5m 59s
-
(Locked)
Challenge: Favorites grid1m 46s
-
(Locked)
Solution: Favorites grid8m 55s
-
(Locked)
Challenge: Add a grid view to the app40s
-
(Locked)
Solution: Add a grid view to the app6m 10s
-
(Locked)
-
-
-
-
-
-
-
-
-
-