I am trying to create a ‘streaks function’ inside of my app. When the user has clicked on a button, an icon in a tracker would light up for that day. I am planning for it to only display the past 3 days’ completion status. It is basically like one of those habit trackers currently available on the App Store.
I need help in finding a way to keep the completion status in a variable or object of some sort which would allow me to pull the information out, and display it appropriately in the icons for the previous days. I have attempted to use variables but time is an issue as there is no such function like “if (completionStatus) on (time and date) = true, set image to …”
Any help is appreciated!