An iOS Project showing how to calculate the elapsed days from a start date.
I've created this little app to record long-term effects of a new thyroid medication I'm taking as part of my post-cancer treatment. The idea is that I can check how many days I've been taking it, and to state in a video record how I feel on any particular date. Feel free to modify it to your own needs.
In its current form, the app displays a big label on the front, showing how many days have elapsed since a start date, which can be set in the settings view controller (edit button on the top right).
I'm building this code in a screencast - check it out here:
It's also available on YouTube in three parts:
- Part 1: https://youtu.be/YIKWqU6mhg8 (graphical setup in Interface Builder)
- Part 2: https://youtu.be/Kpo2J0frSWg (NSCalendar and NSDate methods)
- Part 3: https://youtu.be/qVGQXMeOcy0 (normalising NSDate and Key Value Observing)
Enjoy, and Happy Hacking!