Animations! So today, we start learning how animations work. However, we aren’t creating a new app. Project 7 will be the next app. Instead, on day three, we will be adding animation to a previous project. Today we cover implicit and explicit animations, as well as animation bindings.
Animations in SwiftUI are incredibly simple and are built into SwiftUI by using
To continually animate the object,
Explicit animations are more complex and require a bit more setup however give you greater control over the animation. SwiftUI is still going to figure out the animation; nevertheless, we can control items such as the state of animation and the degrees of the animation, such as
Today we are embarking on continuing learning animations, and we cover multiple ways of using animations like animating gestures and controlling the animation stack.
Having control over the animation stack allows you to customize multiple aspects of the animation, just like adding modifiers to your view. Paul does a great job of explaining it in today’s lesson.
Gestures are a great way to give users more ways to interact with your app. A common one is a swipe to refresh. Whoever invented that idea is a genius. In SwiftUI a gesture can be done with one
With the work done over the past few days, we are now at the end of this section and offered to challenge our learning further by these challenges:
Taking the exam for this project, I scored a thrilling 92%, My highest yet! I am thrilled to use animations in other projects!
Today is a consolidation day, just recapping and reviewing what learning has happened with the last three projects, from strings to understanding app bundles. I feel confident in the topics touch on in the past three projects. have all provided some strong learning in key topics such as App Bundles,
Today we are starting a new project called iExpense, a local expense tracker that allows the user to save items to two categories: personal and business. Additionally, we are integrating Data persistence into the project for a better user experience.
Start of a new project. Today we started learning about the limitations that an
There are many ways of adding multiple views to a SwiftUI, One way is using a
To toggle the view showing you would use code like this to show the second view as a pop up sheet:
The vision behind the app is to have data be persistent through the various launches. There are multiple ways of handling this task. With the tiny amount of data that we need to do this with,
This code block takes the array of items and deletes the item matching the UUID provided by
Is a data persistence model that loads every time you open the app, so it is ideal to use User Defaults sparingly. User defaults allow you to store data with data for a key system where the key is a string that you would call to save and retrieve data:
Today we start to put together the project from what we learned from the previous day. Starting with adding the list to the app and creating data that can be deleted and identified. By adding the
When making something identifiable, there must be an id variable; this will generate a UUID for the item. UUIDs are a string with a randomly generated number.
Today is the final day of iExpense, and all of the “polish” was added at the end off yesterday, all that is left now are the recommended challenges:
Additionally, to do the end of project quiz, scoring a 91% with only one out of twelve questions wrong. Despite the challenges this week has brought, I am glad I learned some new skills that I can build upon.
I learned a lot of new content, however I found a significant struggle with articulating these topics as written content. As well as a lack of motivation Next week I hope to have more success and motivation. 😅