hhru/Nivelir

How to get route

Closed this issue · 2 comments

Hi! Thanks for lib!
How can I get first/last route in stack?
Hierarchy
TabBar VC with 3 tabs -> Navigation VC with pushed view controllers ()

Code

return route
  .first(.tabs) 
  .selectedTab
  .last(.stack)
  .??Need to get first or last screen in Navigation VC stack??

Hello 👋

You can use stackRoot and stackTop actions to get the first and last controller in the navigation controller stack:

ScreenWindowRoute()
    .first(.tabs) 
    .selectedTab
    .last(.stack)
    .stackTop
//    .doSomething()

Thanks!