6

Animating a Girl on a Swing

Welcome to the next project. In this one, we’re going to animate parts of an image, specifically an image of a girl on a swing, and make those individual parts move with a natural motion.

To do this, we’re going to take a look at an animating technique that uses any image or vector file of a subject and then cuts that image up into various parts in order to animate them separately. We will also take a look at a new modifier called mask, which is used for setting the opacity of a view.

Let’s take a look at what we will learn in this project:

  • Gathering and slicing images
  • Adding animating variables
  • Adding images to the scene
  • Using the mask modifier

Technical requirements

You can download the resources and the finished ...

Get Animating SwiftUI Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.