tonileipo
tonileipo

Reputation: 25

How to transfer data between page view pages swiftui

I'm wondering how I can transfer data between ForEach cells after I swipe my pagetabview to right. And after last page it should transfer to next view. So somehow I need to take score data back from my cell to view but don't know how.

I created GitHub example for help to see what I mean https://github.com/tonileivo/pageview_data_flow_swiftui

I think its better to watch from GitHub for source code than I paste it to this question.

So after user press start button from ContentView there starts game. User can add scores for each hole and always when user swipe page hole swaps and old scores should shown on new page. After last hole all scores will be shown on scoreboard. Game happens in PlayTabView and cell is PlayPLayercell

Upvotes: 0

Views: 133

Answers (0)

Related Questions