Animate a Day and Night Toggle on iPad

Creator series · Video and written practice guide

An animated toggle communicates a change between two values. An interactive version also responds to an input rather than playing a fixed movie.

Watch the tutorial

How to Create an Animated Day & Night Toggle on iPad (6:12).

Watch the short preview on YouTube (0:16).

Build your own toggle

  1. Draw both visual states. Create the track, movable thumb and day/night symbols. Keep independently animated shapes on separate layers.
  2. Plan the transitions. Make the two end poses and use keyframes to animate position, rotation, opacity or color as appropriate.
  3. Connect the behavior. Use named clips in the Logic workspace and a boolean input to distinguish day from night. Set conditions for the two directions.
  4. Test touch. Add a target where the user should interact and verify both directions in the Test Preview. Check that the input and active state agree.
  5. Choose the output. A movie or GIF shows one sequence; a compatible runtime can respond to input using a .kvk file.

Common problems

  • The toggle changes only once: check that both transition directions exist.
  • The thumb moves unexpectedly: check its pivot and position keyframes.
  • The result is not interactive after export: distinguish a rendered animation from a runtime package.