So I have a fitness app, the user selects one workout before it been displayed as a table view, when a cell is selected I want it to show that cell(containing an exercise) as completed by marking it with a checkmark. this works fine but I am struggling with how to save that check mark when the app is terminated and re launched.
So all my workouts conform to a struct containing an exercise(String) and completed(Bool) property. When the user clicks the cell and presents the check mark/ removes the checkmark i want the completed property to switch the bool in the model and save it as such.
There are currently around fifteen models/ fifteen workouts and I cant find a way of achieveing it.
I am fairly new to this so if any help could be offered I would be extremeley grateful!
Please can someone try and solve this!!
Powered by WPeMatico