I have different views and I can reach them via TabView. My goal is detecting clicks on tabview. If I click on them twice I want to refresh the screen with new updated data. Here is the sample code. Where should I put the code?
TabView {
Text("The First Tab")
.tabItem {
Label("First", systemImage: "1.square.fill")
}
Text("The Second Tab")
.tabItem {
Label("Second", systemImage: "2.square.fill")
}
Text("The Third Tab")
.tabItem {
Label("Third", systemImage: "3.square.fill")
}
}