Programmatic Navigation in SwiftUI

Поділитися
Вставка
  • Опубліковано 10 лют 2025
  • In this video, Mohammad Azam will demonstrate how to perform programmatic navigation in SwiftUI. Azam will explain how to setup custom Environment keys and values to expose a navigate router for your application.
    Gist: gist.github.co...
    Support my work:
    azamsharp.com/...
    #iosdev #swiftui #iosdeveloper Check out my courses at
    azamsharp.school/

КОМЕНТАРІ • 21

  • @Ahmet-k2b2i
    @Ahmet-k2b2i 10 місяців тому +2

    Great sharing. It's clear you're way ahead of the curve in this business. Please guide me to be a little more professional in this business, at least not as much as you.

  • @raymondcordero9718
    @raymondcordero9718 10 місяців тому +2

    Great video. I have a follow up question. This works well for small apps that have simple navigation, but what if my application has 100+ views and I have the app broken down into multiple modules (spm) where each module is independent and doesn’t know about other modules?

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

    Could you do a tutorial for what this would look like in a modularized app? how can you handle navigation?

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

      What do you mean?

    • @raymondcordero9718
      @raymondcordero9718 10 місяців тому

      This is exactly my same situation. I have an app with many modules and trying to figure out the best approach

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

    Very interesting and valuable tutorial thank you Sir

  • @andrespaladines1
    @andrespaladines1 10 місяців тому

    Your video was amazing!
    It’s there a way to achieve this behavior for iOS 15? Must apps still support this version and I am a little obsessed with a clean way to create a SwiftUI only mvvm-c navigation.
    It would be great if you share with us a way to deal with it.
    Thanks!

    • @azamsharp
      @azamsharp  10 місяців тому

      You can use the following techniques:
      ua-cam.com/video/Xd0J18isFEQ/v-deo.htmlsi=b1zk7qOXAdDzCAqJ

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

    Hi azam, is it posible to navigate to detailView using id: int , because i have diferent JSON response for list , and single item, it would be really helpful for me , because im missing something

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

    Hey is there a way to control the back navigation to navigate back to a specific view in the navigation stack?

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

      Maybe this will help:
      twitter.com/azamsharp/status/1696897035868270744?s=20

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

    In this example what we need to do if I want to move on LoginView and from LoginView I try to move on Detail product view?

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

      Maybe this will help:
      azamsharp.com/2023/02/28/building-large-scale-apps-swiftui.html#navigation

    • @Ahmet-k2b2i
      @Ahmet-k2b2i 10 місяців тому

      @@azamsharp Great sharing. It's clear you're way ahead of the curve in this business. Please guide me to be a little more professional in this business, at least not as much as you.

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

    this thing is not working once I move to multiple views. like if I move to ViewA->ViewB it's working fine but when I try to move ViewB->ViewC it's not working. Can you please help me ?

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

    Good solution until you have 100 screens 😅

    • @raymondcordero9718
      @raymondcordero9718 10 місяців тому

      💯

    • @raymondcordero9718
      @raymondcordero9718 10 місяців тому

      What I did was I broke my app into feature modules. But I’m currently creating independent routing within each module

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