How to use NavigationView and NavigationLink in SwiftUI | Bootcamp #30

  Рет қаралды 56,420

Swiftful Thinking

Swiftful Thinking

Күн бұрын

Пікірлер: 91
@1moRep
@1moRep Жыл бұрын
Navigation bar items is depricated, you have to use the .toolbar modifier instead .toolbar { ToolbarItemGroup(placement: .navigationBarLeading) { Button { } label: { Image(systemName: "person.fill") } } ToolbarItemGroup(placement: .navigationBarTrailing) { Button { } label: { Image(systemName: "gear") } } }
@tonnykhumbongmayum8282
@tonnykhumbongmayum8282 10 ай бұрын
⛔ #NavigationView is deprecated. Check ➡ *New* Video #62 *_NavigationStack_* -> kzbin.info/www/bejne/fYuQmYSNgs-HZtUsi=j71M7VmAkN1DrM0e ⛔ #navigationBarItems is deprecated. Check ➡ *New* Video #63 *_Toolbar_* -> kzbin.info/www/bejne/a2TJiHiciNRjqs0si=KsHuRnexUQjMIkMe
@CMessineo
@CMessineo 8 ай бұрын
What do you put inside the "button" code to switch to the other screen?
@erenunal1512
@erenunal1512 3 ай бұрын
@@CMessineo first, sorry for my english. NavigationLink doesnt need a button. They dont work together. Just use NavigationLink without button section. Try this: .toolbar { ToolbarItemGroup(placement: .topBarLeading) { HStack { Image(systemName: "person.fill") Image(systemName: "flame.fill") } } ToolbarItemGroup(placement: .topBarTrailing) { NavigationLink(destination: myOtherScreen()) { Image(systemName: "gear") .foregroundColor(.red) } } }
@rubensiman8749
@rubensiman8749 Жыл бұрын
One day, I will meet you and thank you for everything you have done!, each of your videos are so well made and have help me out so much !
@letswrite_code
@letswrite_code 2 ай бұрын
excat same thing what i thought today
@rubensiman8749
@rubensiman8749 2 ай бұрын
@@letswrite_code funny thing I just put my first app in the App Store all thanks to him
@PhilipHerlitz
@PhilipHerlitz 29 күн бұрын
I hate SwiftUI...but this video finally showed me something I like. Thank you!
@yourbestsail
@yourbestsail Жыл бұрын
Hello Nick, the NavigationView is deprecated since 2022. Could you make a video about the NavigationStack? Thanks a lot for your fantastic SwiftUI courses!
@dhruvsharma7769
@dhruvsharma7769 8 ай бұрын
and also buddy it is nothing complex it is same as Navigation View
@yourbestsail
@yourbestsail 8 ай бұрын
@RehanKhan-zw3vqThank you 😊
@paragjyotideka1246
@paragjyotideka1246 2 жыл бұрын
Excellent Language! I am coming from a react native background and it's just so similar, but way more intuitive and simple. Swift is just simply amazing. And you explained it so beautifully.
@SwiftfulThinking
@SwiftfulThinking 2 жыл бұрын
Thanks! React is also great 👍
@sarimahmad478
@sarimahmad478 Жыл бұрын
100% agreed, those who are coming from the react native background, this is the best series for learning SwiftUI
@roshanthapa25
@roshanthapa25 2 жыл бұрын
Beautifully explained. Glad I found this channel today, event if it's quite late
@andrejkling3886
@andrejkling3886 3 жыл бұрын
Excellent tutorial.... amazing. Thank you so much. Real knowledge. Keep going....
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
My pleasure. Thanks for watching Andrej...
@andrejkling3886
@andrejkling3886 3 жыл бұрын
@@SwiftfulThinking you are smart... Go Beyond
@bbulliard
@bbulliard 3 жыл бұрын
Great video! bought you 3 coffee's to keep you going with all these fantastic video's....bob
@julianm080808
@julianm080808 9 ай бұрын
Nick thanks for making this video is awesome, keep it up God bless you
@sadeqnoori8707
@sadeqnoori8707 3 жыл бұрын
Sure, I am excited.....
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Hahaha glad you are too!
@alexbggtt
@alexbggtt Жыл бұрын
So helpful! I do have a question though, and I'm sure other people have had the same... When I switch to a different struct with a navigation link (like a log in screen to a main menu), when I add a new navigation link to the menu and use it; the third page has both the original navigation title that returns to the first page, and a second underneath it that returns to the second page, and it downshifts the entire third page. Does anyone know how to fix this? Thank you so much for your channel and I hope you never stop making these videos!
@jerripot
@jerripot 3 жыл бұрын
Good stuff thank you. I was thinking along the about getting from the third screen back to the first without visiting the second view on the way?
@yuchen3587
@yuchen3587 2 жыл бұрын
How many people are using SwiftUI in the world? You deserve more subscribers
@SwiftfulThinking
@SwiftfulThinking 2 жыл бұрын
Haha I think more people are learning SwiftUI every day
@shazimulkaif1103
@shazimulkaif1103 9 ай бұрын
I don't know why your intro feel like ad... Thanks for making video.
@Firelordca4
@Firelordca4 2 жыл бұрын
Amazing video. Any plans to redo, or re-upload this video, now that iOS 16 is out and NavigationView got a complete overhaul?
@dochard5511
@dochard5511 2 жыл бұрын
Great video. Any tips on dismissing the entire stack at once rather than going back each time?
@heshamabdo6024
@heshamabdo6024 2 жыл бұрын
Please we need a video of the new navigation technique in IOS16 it's called Navigation Stack
@rafatwasef8518
@rafatwasef8518 2 жыл бұрын
Great video as usual Thank you so much
@magedmohmed4403
@magedmohmed4403 2 жыл бұрын
Nick , Thank you again for your helpful tutorial 🤎🤎
@seferzeynalli8188
@seferzeynalli8188 3 жыл бұрын
thank you very much
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
You're welcome Sefer !
@mohanedAlsheikh
@mohanedAlsheikh 2 жыл бұрын
Helpful, Thanks a lot
@IsmaelCostaa
@IsmaelCostaa Ай бұрын
Hello, Nick. Why you use ZStack inside of MyOtherScreen instead of a vstack or hstack...
@rishabhbhatia1847
@rishabhbhatia1847 10 күн бұрын
for deprecated features for which you have created new videos, can you add in the description of the respective video the new video link so that we know that there is a new video for this and that this is deprecated.
@CMessineo
@CMessineo 8 ай бұрын
This is the first video I couldn't finish, because I couldn't figure out how to make NavigationBarItems work in 15.x. EDIT: I got it to work - it was just a typo.
@SwiftfulThinking
@SwiftfulThinking 8 ай бұрын
You can still use deprecated methods. Apple will “deprecate” methods but they will continue to work for years lol the new way is using .toolbar. FYI, I’ve appended videos at the end of each playlists that cover these changes when you get there
@muhammedturk_22
@muhammedturk_22 2 жыл бұрын
Hey Nick !! Your videos are amazing but there are some tools deprecated. Isn't it possible to talk about the tools deprecated ?
@최승기-g8f
@최승기-g8f 3 жыл бұрын
great!!! thank you
@swaragandhi6122
@swaragandhi6122 Жыл бұрын
Your video is super helpful but I have a question. How to I hide the buttons above my navigationlink so it does not show up on my second screen.
@knowledgeispower4953
@knowledgeispower4953 10 ай бұрын
Greate bro..😇
@markme7092
@markme7092 3 жыл бұрын
make some video on advanced topic like firebase upload image in list and some others SwiftUI advance.
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Hi Mark! Of course... I will be adding more advanced playlists after this one. However, the SwiftUI Bootcamp is going to be beginner level videos only.
@mrclean851
@mrclean851 3 жыл бұрын
Hi, excelente video. Two questions : 1) Can I add an Image(systemName()) to the NavigationTitle()? 2) can I put the .NavigationLink() inside a .OnTapGesture?
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
1) No, but you can use emojies in the Navigation title 🥳 2) No, a NavigationLink is a clickable button itself. You don't need the tapGesture!
@raviprajapati6677
@raviprajapati6677 Жыл бұрын
Hi can you explain after tap on login screen how to change root view in swiftui?
@rasheed1andrew
@rasheed1andrew 3 жыл бұрын
it would be great to put the problems one might face by putting "MyOtherScreen" in another navigation view because It took me two weeks to figure it out. again thanks for your videos. I found it in a nick of time. if I'm right putting "MyOtherScreen" in another navigation view will make the screen look funny at the top when you segue from the first screen to the next screen. it creates too mush extra space that is suppose to be for a navigation title. at this point I'm changing my instagram bio to software developer.
@rasheed1andrew
@rasheed1andrew 3 жыл бұрын
@ 15:43. got it. just gotta pay attention more. all this knowledge with just 715 views? society is walking on its head and thinking with its feet.
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Haha yea 1 NavigationView is all you need! Thanks for watching Rasheed.
@mhmtkrnlk
@mhmtkrnlk 2 жыл бұрын
Hey its been long time upen this video but can you show .isDetailLink stuff how to rotate between like viewA->viewB->viewC->viewA
@mohammadsadman8567
@mohammadsadman8567 Жыл бұрын
Hey i am new on swiftui and xcode, i am used to using vs code and prettier. how can i achieve on save code format on xcode like prettier. i have turned on convert exist file on save . There is always empty lines in code i want it to gone away on save
@videodudeler
@videodudeler 2 жыл бұрын
If you wanted to can you also turn the other 3 hello worlds into naviagation links aswell? can you do multiple navigation links in the list
@iAmBeyondGreat
@iAmBeyondGreat 3 жыл бұрын
great video
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Thanks Charlie!
@wetali91
@wetali91 2 жыл бұрын
Great video, but keep in mind that this is deprecated, so now apple want us to use NavigationStack instead.
@randlyce
@randlyce 3 жыл бұрын
Hey i got a question, for that third screen. I tried using navigation link to go to a new link but for some reason my "back" button keeps getting added instead of it being replaced so say my first view is inboxes i click the navigation link and then it would move to the messages views there would be a back button that says inboxes (still normal) but then from that second page when i click a navigation link to a third page then the back button that says inboxes is still there PLUS underneath it there's a back button for me to go to messages as well. could you help me please?
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Hi Arman! It sounds like you have 2 NavigationViews in the hierarchy. Once you are inside a NavigationView, you only need to use NavigationLinks to segue. I'm guessing the 3rd screen you are going to has another NavigationView on it. You only need to use this once!
@ktok8855
@ktok8855 2 жыл бұрын
cannot use .navigationBarItems right now(22.11.04) i made same UI with .toolbar { ToolbarItem(placement: .navigationBarLeading) { Image(systemName: "person.fill") } ToolbarItem(placement: .navigationBarTrailing) { Image(systemName: "gear") } } anyone who have better ideas, please comment below
@ktok8855
@ktok8855 2 жыл бұрын
also cannot use .accentColor. I used .foregroundColor instead
@vazzhh
@vazzhh 10 ай бұрын
.toolbar { ToolbarItem(placement: .topBarLeading, content: { Image(systemName: "person.fill") }) } jajajaja exactly the same
@MegaOlzo
@MegaOlzo 6 ай бұрын
Maybe it helps someone. After deprecation, the new implementation looks like this: in new implementation instead of NavigationView >> NavigationStack. Also changed NavigationLink syntax. Implementation looks: NavigationStack { ScrollView { NavigationLink { MyOtherScreen() } label: { Text("Hello World!") } Text("Hello World!") Text("Hello World!") Text("Hello World!") } .navigationTitle("All inboxes") .toolbar { ToolbarItem(placement: .topBarLeading) { NavigationLink { MyOtherScreen() } label: { HStack { Image(systemName: "person.fill") Image(systemName: "flame.fill") } } } ToolbarItem(placement: .topBarTrailing) { NavigationLink { // Some another screen } label: { Image(systemName: "gear") } .tint(.red) } } }
@grenvil8414
@grenvil8414 3 жыл бұрын
is possible to make styling on "ALL INBOX", example change color ?
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Hi Adit! I will cover updating fonts in a future video, but if you want to override the default font in the NavigationView you can the following within the init or anywhere in your app before the screen loads: UINavigationBar.appearance().largeTitleTextAttributes = [.font: UIFont(name: "Arial", size: 32)!]
@grenvil8414
@grenvil8414 3 жыл бұрын
@@SwiftfulThinking thank you very much for you help, I found other solutions, I hide the bar, and create custom Navbar, with HStack
@mygamblingstories5765
@mygamblingstories5765 3 жыл бұрын
Hi, 1) Is it possible in an argument title of NavigationLink to pass anything instead of String? 2) How I can set any modifier(.font(.title2) .fontWeight(.semibold) to a title(String) argument of NavigationLink? Thank you
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Hello! No, this is not possible. The Navigation Title that comes by default is not very customizable. You would need to make your own title section and customize a Text().
@hugob5093
@hugob5093 3 жыл бұрын
Is it possible to resize the navigation bar ? To use it as a header of the view ? Thank you
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Hi Hugo! No, unfortunately we can't customize the default Navigation Bar that Apple gives us. However, we can hide the Navigation Bar and put our own custom View on the screen instead. If you are just learning SwiftUI, I would recommend using Apple's default styling until you are more comfortable. I will be doing a "Custom Navigation Bar" in a more advanced course coming soon!
@Pro-jz8wg
@Pro-jz8wg 3 жыл бұрын
Thank you for your work! its one of the most understandable video that I watched about navigation links with swiftui. But now im stuck when im trying to link login and password button with firebase. Do you have any content about it on your channel ? //sorry for my English)
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Hi ProДеньги! I do not have any Firebase content YET. However, I've had many requests for it so I'm planning on doing a Firebase playlist soon.
@GabeGarboden
@GabeGarboden 3 жыл бұрын
@@SwiftfulThinking This would be great if you're still considering this!
@TeemoChan
@TeemoChan Жыл бұрын
I know Your are busy with firebase course but Can You Redo this tutorial as navigationView is deprecated and all other tutorials are complicated
@SwiftfulThinking
@SwiftfulThinking Жыл бұрын
I am adding videos to the end of this playlist starting next week 👍
@bbulliard
@bbulliard 2 жыл бұрын
Is there a limit to number of navigation links, or entries in navigation view? After I did 10 entries,I get a compile error….extra argument in call
@SwiftfulThinking
@SwiftfulThinking 2 жыл бұрын
Hey bob! I think there’s a limit to 10 items in any ViewBuilder (HStacks, VStacks, etc.) It should work if you break it up into sections (you can do stacks within stacks) or use a ForEach loop instead
@mrclean851
@mrclean851 3 жыл бұрын
Continuing with my questions : one of two, I am either doing something wrong or it can't be done who I have my setup. I am have custom shapes (I would like to use them as buttons/navegationlink label) I have a ForEach loop within a ZStack displaying 6 of these navegationlinks, each to a different destination. Result: they do display, but upon clicking each one, only the last one is selected, and thus can only segeway to the last View! What am I doing wrong? is there an issue generating navegationlinks within a ForEach within a ZStack? thanks Nick!
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Hi! The source code is available on my Github if you want to compare your code (github.com/SwiftfulThinking). It sounds like you're mistyping something.
@mrclean851
@mrclean851 3 жыл бұрын
I think it has todo something with the tappable area = .frame and zstack overlaying these frames. My shapes are irregular (arcs) and .frames are square! Any suggestion?
@DrzReaper
@DrzReaper 3 жыл бұрын
Hey, I'm trying to add the ScrollView() ontop of my Image("background") but for some reason my image always overlaps the scrollView is there a solution to this?
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Hey, I'm not sure exactly what the issue is. The background should be i na Zstack behind the scroll view. You can post some code in our Discord if you're still stuck: discord.gg/vhKKyYTGDb
@CFthorin
@CFthorin 2 жыл бұрын
hmm seems like navigationBarItems has been deprecated
@SwiftfulThinking
@SwiftfulThinking 2 жыл бұрын
We can use the .toolbar instead, and place items on the .navigationBarLeading and .navigationBarTrailing placements!
@haidersalih287
@haidersalih287 3 жыл бұрын
Lets get Coding
@SwiftfulThinking
@SwiftfulThinking 3 жыл бұрын
Let's goo!
@bravolatavera3647
@bravolatavera3647 Жыл бұрын
presentationMode.wrappedValue.dismiss() is now deprecated. use @Environment(\.dismiss) private var dismiss
@JeckyKA
@JeckyKA 3 жыл бұрын
great, thanks a lot!
Add, edit, move, and delete items in a List in SwiftUI | Bootcamp #31
27:29
How to use NavigationStack in SwiftUI | Bootcamp #62
23:59
Swiftful Thinking
Рет қаралды 37 М.
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 6 МЛН
كم بصير عمركم عام ٢٠٢٥😍 #shorts #hasanandnour
00:27
hasan and nour shorts
Рет қаралды 10 МЛН
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 4,1 МЛН
The Complete Guide to NavigationView in SwiftUI
39:18
Paul Hudson
Рет қаралды 131 М.
SwiftUI Navigation - NavigationView & NavigationLink Tutorial
17:34
How to use inits and enums in SwiftUI | Bootcamp #13
19:30
Swiftful Thinking
Рет қаралды 42 М.
LazyVGrid, LazyHGrid, and GridItems in SwiftUI | Bootcamp #16
22:16
Swiftful Thinking
Рет қаралды 47 М.
SwiftUI Card View - Group Box & Customizations
10:21
Sean Allen
Рет қаралды 17 М.
NavigationStack - SwiftUI Programmatic Navigation - iOS 16
20:20
This NEW SwiftUI Feature Is AMAZING | Navigation Stacks
20:05
How to use @ObservableObject and @StateObject in SwiftUI | Bootcamp #50
35:12
Why You Should Use The SwiftUI Coordinator Pattern
18:45
Rebeloper - Rebel Developer
Рет қаралды 16 М.