- I Started by creating a github project followed by the xcode project
- Looking at the wireframe, I created a simple SwiftUI View with texts, textfield, picker and a button
- I created a
ViewModelfor said View, and added it to it - For the time being I created a in memory Measurement array where the measurements would be added and started implementing the
save()function - While working on the
save()function implementation, I added a Measurement model, functionality for parsing the input text into a decimal number, calculating the average value and displaying it - Next, I added a check for non negative numbers and functionality to show an alert with a simple message
- I then created a separate function to save the measurement and to make sure it's always a single unit that is being stored
mg/dL - I added an additional view to show All Measurements that could be accessed by taping the toolbar button on the top right.
- Then I updated the
Measurementmodel and added anidanddate - When the basic functionality was implemented, I added
SwiftData - I added some tests
- Refactored the code a bit so its reusable and updated tests
-
Notifications
You must be signed in to change notification settings - Fork 0
kalafun/MySugr
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
MySugr assignment
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published