GithubHelp home page GithubHelp logo

darrarski / tca-swiftui-navigation-demo Goto Github PK

View Code? Open in Web Editor NEW
91.0 2.0 7.0 1.95 MB

Demo project that shows how to implement navigation in SwiftUI iOS application using Swift Composable Architecture

License: MIT License

swiftui swiftui-example composable-architecture swift-composable-architecture ios example navigation swiftui-navigation

tca-swiftui-navigation-demo's Introduction

SwiftUI Navigation with Composable Architecture

Swift v5.3 platforms iOS test coverage 95%

๐Ÿ“ Description

This is a demo project that shows how to implement navigation in SwiftUI iOS application using Swift Composable Architecture. It uses NavigationLink to push screens onto the navigation stack. App state is managed using Composable Architecture. It also contains logic responsible for handling long-living effects and dismissing the stack to the root view (pop-to-root).

Solutions used in this project are described in the article: Thoughts on SwiftUI navigation.

Navigation in demo app
navigation in demo app

๐Ÿ›  Tech stack

The project contains unit and snapshot tests. Reference images for snapshot tests were recorded using iPhone 12 simulator.

โ˜•๏ธ Do you like the project?

Buy Me A Coffee

๐Ÿ“„ License

Copyright ยฉ 2021 Dariusz Rybicki Darrarski

License: MIT

tca-swiftui-navigation-demo's People

Contributors

darrarski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tca-swiftui-navigation-demo's Issues

Cyclic dependency.

@darrarski How can I push the same view multiple times on navigation stack, since it will result in cyclic dependency.
Any solution to this problem, as I like the pattern very much and used it on my project but now I got stuck.

view to navLink to Sheet to nabLink

hi I am using your code into my open source project and its really cool but I am having problem with sheet to navigationLink

I have 1st screen it conversation screen then I click itemBar for new chat(its ContactsView ) then from ContactsView I like to go chatRoom with navigationLink so when chatRoom user will click back button I should go back to conversationView

but now from ContactsView NavigationLink does not working

Simulator Screen Recording - iPhone 12 Pro - 2021-06-13 at 13 07 19

my gist

nav to nav to nav working great :) thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.