Hi. I would like to code a multiple timer app for me and my family. And i would now like to show these multiple timers in a list. From the list the user can tap on a timer (list row) and than go to the selected timer. Like in this app: https://youtu.be/KAIOYlXi2KE So far I've already managed to generate the transition from my list to my timer view with a navigation link in my list:
NavigationLink {
TimerView(timerObject: timer)
} label: {
Text(timer.name)
}
}
But if I now go back to my list, and then try to go to the same timer which I started earlier, a completely new instance of my timer view is created even though I am still getting the print commands (every second) in my console of my earlier started timer. So how can I code that each list row has only a single instance of a timer and then always goes back to just that one timer? I would be really happy about help. Thank you!