Introduction to NavigationStack in iOS 16

Поділитися
Вставка
  • Опубліковано 22 сер 2024

КОМЕНТАРІ • 79

  • @ChaseMcElroy-ul8ns
    @ChaseMcElroy-ul8ns Рік тому +3

    Thank you! Your videos are more valuable than WWDC.

  • @asseeger
    @asseeger Рік тому +14

    Even though it’s been said before-I am just going to repeat:
    these are the types of videos that should be 1st-party-provided.
    Soooo well done, concise and to the point. Thanks a lot!! 😊

  • @bugsyace
    @bugsyace Рік тому +2

    I wish I had enough money to buy you a car , lol. I have spent close to 100 hours watching videos and trying to figure out how to create individual screens. I am new to this and so many instructors don’t show the data and how it is coded and brought into The navigation. I had actually given up hope that you could create navigation without a list and here in your first video you have lit the flame that was exhaustedly going out. Thank you so much for being so specific and taking the time to show how everything works together.

    • @StewartLynch
      @StewartLynch  Рік тому

      Thanks for taking the time to show your appreciation. That means a lot to me. Glad I could be of some assistance.

  • @edwardhasted3849
    @edwardhasted3849 Рік тому +4

    Wow - at last an explanation of the NavigationStack that not only makes sense but so cogently presented. Almost every other explanation I read and viewed was relying on telepathy for the transfer of knowledge. Thank you so much and wish Apple had the wit to follow your approach.

  • @duffelduffel
    @duffelduffel 5 місяців тому

    I'm late to the party but many thanks for this. I like the organization of content and the ability to load Views directly. After messing around with it I can jump around TopicViews by adding a navigationLink to a TopicView but that does add Views to the stack without removing them when you navigate back. Combined with what I learned in your Navigation Stack Part 2 tutorial I can add a NavigationPath and remove Views from the stack to navigate back two screens, go directly to the root menu screen, etc. (oops - I meant this to go on Enum Navigation)

  • @kyle2194
    @kyle2194 Рік тому +1

    Stewart, your videos are a fantastic resource. I learned the subject material from this video, and I've sent it to others to be their learning guide. Thank you.

  • @Al.2
    @Al.2 Рік тому

    Thank you for starting out with how things used to be done before.

  • @AndyThePinoy
    @AndyThePinoy Рік тому +3

    This 3 part tutorial is fantastic - you've earned a new subscriber. I've also learned the words homogeneous and heterogeneous - love these, great for explaining!

  • @danuff
    @danuff Рік тому +1

    Why can't apple provide more code samples and videos like the above, so the rest of us know what the heck is going on??? Well done and THANK YOU!

    • @StewartLynch
      @StewartLynch  Рік тому

      You will have to ask them ;). Glad you appreciate what I do.

  • @andrejkling3886
    @andrejkling3886 Рік тому +1

    Thank you Stewart...

  • @josdownunder
    @josdownunder Рік тому +1

    Thank you for this video. Very well explained. Not rushed, and with excellent examples.

  • @wallacewittkoff8123
    @wallacewittkoff8123 Рік тому +1

    Thank you!, I have edited my comments as I figured out how to make this navigation structure work with my coredata objects, not that I can explain it very well as I'm a novice programmer. I was making it more difficult than I had to. In essence the navigationLink "value:" was just the coredata object I was iterating over and navigationDestination "for:" was the class for the object along with self. What helped is Stewart's 2nd part video on this topic. I may be saying all this wrong but it worked and I was able to update my code with this new structure. Thanks again.

  • @0Patroy0
    @0Patroy0 9 місяців тому

    Thank you very much for your work, great videos

  • @Shmarti
    @Shmarti Рік тому +1

    Been waiting for you to explain this in detail. Thanks 🙏

  • @tazman7689
    @tazman7689 Рік тому +1

    Great video Stewart. Very clear on how to implement it with great examples.

  • @user-oo7uq8ur9x
    @user-oo7uq8ur9x Рік тому

    Loved this tutorial i am amazed and astonished that someone like you exists in this world and is able to give these lessons to such a degree i am your fan and will always support you ❤

  • @rungxanh2901
    @rungxanh2901 Рік тому +1

    Thank you for the tutorial Stewart, looking forward to the next videos in this series

  • @likemarathisongs
    @likemarathisongs Рік тому

    Very lucid. Thanks a lot. I get a lot to learn from your videos.

  • @thomascole8216
    @thomascole8216 Рік тому

    If you are not an instructor, you should be! Bravo

  • @jordibruin
    @jordibruin Рік тому +1

    Super clear as usual, thanks Stewart!

  • @joalux
    @joalux Рік тому +1

    Great video Stewart, thank you!

  • @hakeemdeggs9117
    @hakeemdeggs9117 Рік тому

    Brilliant!!!!!

  • @larschristiansen3136
    @larschristiansen3136 Рік тому +1

    Merci. Ce video est une super reference pour la nouvelle navigation avec swift.

    • @StewartLynch
      @StewartLynch  Рік тому

      Merci, je suis content que ça te plaise.

    • @larschristiansen3136
      @larschristiansen3136 Рік тому

      Bravo pour ton français. I did not realize it at once, being used to see French 😃

    • @StewartLynch
      @StewartLynch  Рік тому +1

      We learn some French here in Canada because it is an official language. My wife is fluent, but I mostly can barely understand.

  • @arkemal
    @arkemal Рік тому

    Very, very clear. Thank you Stewart

  • @emdutt4012
    @emdutt4012 9 місяців тому

    amazing video

  • @brucknerdevilliers
    @brucknerdevilliers Рік тому

    Good work, thank you.

  • @raymondboye5946
    @raymondboye5946 3 місяці тому

    Thanks😀

  • @andresraigoza2082
    @andresraigoza2082 Рік тому

    Really great tutorial, tank you so much 😊

  • @pottsma
    @pottsma Рік тому

    Thanks for all the great videos!

    • @StewartLynch
      @StewartLynch  Рік тому

      You're welcome Michael. Glad you are enjoying them.

  • @stelluspereira
    @stelluspereira 3 місяці тому

    Thankyou Mr Lynch, very clear explanations (all of your videos)
    I am looking for SplitNavigation view & NavigationStack combination, bit not clear from SwiftUI documentation & how to implement, would care to share snippet of code ?

    • @StewartLynch
      @StewartLynch  3 місяці тому

      NavigationSplitView will collapse to a NavigationStack when your device is in compact width. Have you seen my video on NavigationSplitView? ua-cam.com/video/RsmMLLL8FB0/v-deo.html

    • @stelluspereira
      @stelluspereira 3 місяці тому

      Excellent Sir, Thankyou

  • @wonton120
    @wonton120 Рік тому

    Very clear. Thanks!

  • @JosephinYeri
    @JosephinYeri 7 місяців тому

    very detailed explananation thank you. But there is one thing stucked my mind . Why does the random button, which normally gives the same appearance, give a different appearance after adding a path? Isn't the navigation stack have the default path anyway?

    • @StewartLynch
      @StewartLynch  6 місяців тому

      Can you give me a time stamp on the video that you want me to look at. I created that video a long time ago.

  • @roman3249
    @roman3249 Рік тому +1

    This is a 🔥

  • @RobertHolzapfel
    @RobertHolzapfel Рік тому

    excellent tutorial. 😍

  • @Pr0Cre
    @Pr0Cre Рік тому +1

    Thanks! I wonder how it works, when having two String values, but I want to have them on different views. For example: stringValue1 = author name, and stringValue2 = birthplace. Since I can only differentiate between String, Int, etc. this probably won't work, would it?

    • @StewartLynch
      @StewartLynch  Рік тому

      It threw are on different views, you have a different binding to the String. Perhaps I don’t understand your question. Feel free to send me an email with a small sample project that displays the issue and i will take a look.

  • @Kush_Daddy
    @Kush_Daddy Рік тому

    Is there a way to use this navigationstack to automatically navigate to your next view? It seems like now when you want to navigate, you have to create a physical button or link to press and begin navigating to the next screen. However, you used to be able to use the navigation links isActive parameter and create an empty view ao that when the condition is met, you can automatically navigate without pressing anything Such as after a api call.

    • @StewartLynch
      @StewartLynch  Рік тому

      Yes, this is possible by using a path and simply updating the path. I do cover this I believe.

  • @mhfs61
    @mhfs61 Рік тому

    👍🏼👍🏼👍🏼

  • @nikitapatidar8907
    @nikitapatidar8907 Рік тому

    Well I need to navigate to more view from the subview but the problem is every time the navigationDestination mention in root view get called and navigation from subview fails some time any suggestions ? and also I need to pass the data from subviews which is being hurdle for me.

  • @NikolaJovanovicSimunic
    @NikolaJovanovicSimunic Рік тому

    Hello Stewart, just one question
    How would i continue my navigation from the second screen? For example, going in to the some third screen?

  • @nileshjdarji
    @nileshjdarji 9 днів тому

    I am building a test project for myself which is an app that can remember what shows I am watching. The app remembers what season I am currently on and what is the last episode that I have watched. I am using SwiftData for persistence. Now with all this in place, my main question is I started with NavigationLink inside NavigationStack to edit information on a show. but passing in data to the next screen using NavigationLink was not reliable. It was freezing the app. But after I restart the app every thing starts working. Then I switched the UI around to use .sheet on the ListView instead of NavigationLink. The app behaved every single time as it suppose to. In your opinion what are good use cases for NavigationLink and Presenting a sheet with .sheet modifier? Sorry for this long question.

    • @StewartLynch
      @StewartLynch  9 днів тому +1

      Not sure why it would be freezing. Sounds like something else is wrong there. I guess it depends on your app, but for edits, I prefer sheets.

    • @nileshjdarji
      @nileshjdarji 9 днів тому

      @@StewartLynch Thank you for your quick response. I went back and checked, it is not hanging. It does navigate to the Edit screen but the screen is blank. Not even I see the navigation title. I only see a back button. Then when I kill the app and restart the app and then navigate all works normal.

    • @StewartLynch
      @StewartLynch  8 днів тому +1

      I would have to see your code to know what is going on.

    • @nileshjdarji
      @nileshjdarji 8 днів тому

      @@StewartLynch That is kind of you. But I will certainly first try to fix it myself. If I fail I will send over the code. I am learning a lot from your videos.

  • @MarkVolkmann
    @MarkVolkmann Рік тому

    There is still one aspect of this that is escaping me. I see that if I pass a `path` to `NavigationStack` (either an instance of `NavigationPath` or any `Array`), I can pop to the root screen. In the case of `NavigationPath` I can call `path.removeLast(path.count)`. In the case of an `Array` I can just set it to an empty `Array`. But this only seems to work if my `NavigationLink` instances are created with a `value` argument. If I instead create them with a `destination` argument, I can't find a way to pop to the root screen. Is that possible?

    • @StewartLynch
      @StewartLynch  Рік тому

      Don’t use the NavigationLink with destination any more Mark. Trigger the navigation based on a change of value and use the .navgationDestination(for:) to get an instance of that value and create the View for the destination there.

    • @markvolkmann1117
      @markvolkmann1117 Рік тому

      @@StewartLynch Yeah, I learned how to do that from your video and I see how that is useful in many scenarios. But sometimes each link goes to a specific view that isn’t based on a value. There can be a one-to-one relationship between links and views and I still would like the ability to pop to root.

    • @StewartLynch
      @StewartLynch  Рік тому

      You should always be able go link it to some value. Just create an enum with a case for each of your views then switch on the case to go to the destination.

    • @markvolkmann1117
      @markvolkmann1117 Рік тому

      @@StewartLynch That’s encouraging because that’s exactly what I did! I just wasn’t sure that was the best option. I’ll stick with that. Thanks Stewart!

  • @codegiz
    @codegiz Рік тому

    The starter project link is not valid, it has ... in the link 😀😀

    • @StewartLynch
      @StewartLynch  Рік тому

      I think you will find that the error is on your end. You are likely using Chrome and your security settings are not allowing zip downloads. Please try using Safari and you will find that it works. I just verified that the link works when using Safari.

    • @codegiz
      @codegiz Рік тому

      @@StewartLynch Oh yes, now it works. Just now I was wondering why your other links with ... are working.😅😅

    • @StewartLynch
      @StewartLynch  Рік тому

      @@codegiz author other links are not zip files.