Summary
To recap what we covered in this project, we added images to the Assets catalog and accessed them in our code. Then, we created three separate files to hold the elements that we need – one to hold the record player box; one to hold the spinning record, the arm moved with an anchor point, and a dynamic button; and one in which we wrote code to access a sound file. Once we created these elements, we merged them into one view, to create a record and animated record player.
In the next chapter, we’re going to continue working with Swift animations by exploring colors. We will create a simple project that displays various images and then, using hueRotation
, change the color of the images to display a kaleidoscope effect. We will also look at how to pass data bidirectionally to another view, which gives up more flexibility than using the @State
property wrapper.