Displaying a detail screen with NavigationLink - SwiftUI Starter Project 5/14

preview_player
Показать описание
In this video we create a detail screen using images and a ZStack, then show it using NavigationLink.

This project is aimed at programmers who have some experience with Swift and UIKit already, and want to get up to speed with SwiftUI as quickly as possible.
Рекомендации по теме
Комментарии
Автор

You say they navigationLink which contains the destination view will use memory because it has to build the destination view for each row. But what is passed is a view builder, not a view. Do you mean that for each row a new view builder func is created ?

xavierrouet
Автор

Only 5:30 into so question might be answered but I’ve drawn a map to each of the 6 files being used … anyways I’m having trouble understanding when we used the hashable menuitem that makes this all come together, if that makes sense. If not I’ll try different wording.thank you

stephaniewagstaff
Автор

Hey Paul. I noticed a time ago that when we navigate to another screen, like you are doing here, we actually initiate that next screen two times. You can try it using a print inside the init of the second screen. Do you know why this happens? It's a mystery for me.

fre.helfer
Автор

Thank you for the great tutorial, Paul. Just one clarification if I may, with the introduction of .navigationDestination, does it only build the destination view once clicked vs building destination view for each of the cells regardless of being clicked or not?

vandanpatel
Автор

What is 'MenuItem' where did this come from?

dugrut
Автор

you spend too much time on old ideas. NavigationStack is a new process and you skim over it...

dugrut