From the course: iPadOS 13 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.
Using SwiftUI to create navigation - iOS Tutorial
From the course: iPadOS 13 Development Essential Training
Using SwiftUI to create navigation
- [Instructor] Let's say you wanted to use SwiftUI to create a navigation view, with a list of items, and you tap an item, and go to the detail view for that particular item. With SwiftUI, this is much simpler than it is and doing with code, without SwiftUI. So I'm going to delete what I have here, my VStack, and I'm going to create a navigation view in here. And to do that, I'm simply going to hit the plus button, and then go into the library, and this item all the way on the left, and then type, the view that I want to grab, which is navigation view. Click and drag that into your code, where you want it, and here it creates a navigation view, and that has this navigation link object. So it's going to need some kind of destination view. So let's create a new struct called Detail View, and it's going to inherit from view. So, if you hit that fix it button, you're going to be asked if you want to add protocol stubs. Now…
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)
SwiftUI basics4m 46s
-
Previewing multiple platforms in SwiftUI2m 53s
-
(Locked)
Using SwiftUI to create navigation4m 10s
-
(Locked)
Creating a SwiftUI navigation model3m 4s
-
(Locked)
Setting a default selection2m 58s
-
(Locked)
Working with unsupported views in SwiftUI2m 24s
-
(Locked)
Challenge: Add an image1m 43s
-
(Locked)
Solution: Add an image2m 44s
-
(Locked)
-
-
-
-
-