Extract ViewModel from UINavigationPath #285
Unanswered
akaDuality
asked this question in
Q&A
Replies: 1 comment
-
I can create interface for function |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to separate data-level of stack navigation from UI level of routing. For that I can use SwiftUI's
NavigationPath
andCasePaths
to achieve tests like that:This is possible by
CasePath
, it's beautiful:Unfortunately,
UINavigationPath
has no access to the last element (it is closed by@_spi
) and I can't extract viewModel from it.How I can write unit tests against
NavigationStackController
and associatedUINavigationPath
?Beta Was this translation helpful? Give feedback.
All reactions