Adding UserDefaults & Learning Animations | Weekly Review Ep.3

100 Days of SwiftUI: The Halfway Mark

I'm on day 42 of the '100 Days of SwiftUI' challenge, and this week has been a mix of anticipation and realizations. Originally, I planned to split my week between course work and app development. However, upon discovering that data persistence—the next big hurdle for my app—would soon be covered in the course, I decided to hold off and stick with the curriculum.

Swift Concepts Demystified

Animations: From Frames to Functions

SwiftUI's animation capabilities are impressive. They remind me of video editing, where you interpolate frames to create movement. SwiftUI, however, offers more nuanced control. I've learned about:

  • Implicit animations that trigger automatically.

  • Layered animations for complex sequences.

  • Timing, delays, and easing to refine the animation's feel.

  • .withAnimation blocks to tie animations to specific events.

Gestures & The Codable Protocol

I also dipped my toes into gesture recognition and data serialization. Gestures will make any app feel more interactive, but I'm keeping that for later. The Codable protocol, essential for working with JSON and APIs, still feels like a bit of magic to me.

UserDefaults & Data Persistence

UserDefaults was a more familiar topic as I used it to store app settings. It's a stepping stone to more complex data persistence methods, which I'm eager to get into.

Code Reviews: From Crashes to Creations

MultiplicationGame: A Functional Ugly Duckling

This simple app for kids had its challenges, particularly with state tracking and range generation errors. I had to get creative with my coding to prevent crashes—a valuable lesson in problem-solving.

iExpense: A Daunting Data Dilemma

iExpense was a lesson in list filtering, JSON storage, and, most notably, deleting list items correctly. After hours of frustration and seeking help from forums, I learned the hard way that understanding indexes is vital.

Budget Review: Keeping the Burn Slow

This month's expenses were hefty, but I'm still under budget. I'm approaching the break-even point cautiously, knowing that next month's budgeting will be critical.

App Progress: Setting Up for Success

While I postponed delving into SwiftData, I did venture into designing the UI for a settings screen and implemented UserDefaults to store those settings. It's a humble but significant step in my third week of programming.

Looking Ahead

Next week is all about doubling down on the '100 Days of SwiftUI' to reach the SwiftData segment sooner. And, of course, you'll be the first to know about any new developments.

Previous
Previous

Mastering Complex Projects with Power BI: A Manager's Secret Weapon

Next
Next

Diving Into SwiftUI and Revealing My App Idea | Weekly review - ep. 2