© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
W. WangBeginning iPhone Development with SwiftUIhttps://doi.org/10.1007/978-1-4842-7818-5_19

19. Using Animation

Wally Wang1  
(1)
San Diego, CA, USA
 

Animation can move items on a user interface to provide feedback or just add an aesthetic touch. Unlike traditional animation created by hand where cartoonists had to draw every single frame but slightly differently, animation in SwiftUI works by simply defining a starting and ending state. Then SwiftUI takes care of animating an item in between those starting and ending states.

The three most common types of animation involve
  • Moving – Changing the x and y position of an item on the user interface

  • Scaling – Changing ...

Get Beginning iPhone Development with SwiftUI: Exploring the iOS SDK 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.