Animating Colorful Kaleidoscope Effects
In this chapter, we will look at how we can animate colors with a modifier called hueRotation
, where “hue” refers to the colors of the object, and “rotation” refers to the colors being rotated or animated. We will create a simple project that displays various images and then, using hueRotation
, we can change or shift the colors of the images so that they will resemble somewhat of a kaleidoscope effect.
Along with hueRotation
, there are some other important concepts we will explore in this project.
We will work with a Picker view for the first time, which is exactly what the name suggests; it lets the user pick from a variety of options, which can then be displayed on the screen.
Also, we will look at how to pass data bidirectionally to another view. If you remember the moving circle project in Chapter 3, it was built inside one file and then within one view, the ContentView
. In Chapter 4, we built the record...