Under the Bridge

Bezier PathMove

Here’s an excellent display of applied Core Animation techniques:

Moving objects along a bezier path in iOS

The PathMove program allows the user to set up a predetermined set of bezier paths and then trigger a UIImageView object to move from start to end along that path. The program incorporates several options to do things like:

  • Select the ending quadrant of the bezier path.
  • Mix and match three different predefined bezier path segments for the starting and ending segments of the overall path.
  • Allow the object to grow, shrink or remaiin the same size as it moves along the path.
  • Rotate the object to match the tangent of the bezier curve as the object moves.
  • Pre-Rotate the object by 90 degrees to accommodate how iOS calculates a tangent.
  • Annotate the complete bezier path with the size and location of all of the path’s the control points

Screen Shot 2012-06-21 at 6.07.33 AM.png

Read the whole thing, and check out the source at JoalahDesigns / PathMove!

h/t: @romainbriche!

1