In the previous sections, we learned a lot about animations in SwiftUI and with the helping hand of Swift Playground, we've been able to demonstrate and see these in action. But there's nothing like practicing them in the real world! In this section, we'll add some of the tricks we've learned throughout this chapter directly into our app. Even with the smallest of changes, you'll instantly be able to see the impact animations have.
Adding animation to our app
Spinning star
Now, let's head on over to our Recipe app and make some changes ourselves. We'll start by heading on over to RecipeDetailView.swift and finding our favorite button. Add the following highlighted code to add a little spin...