Chapter 14. Applying motion effects and dynamics
This chapter covers
- Motion effects using UIMotionEffects
- Adding the parallax effect
- Realistic animations with UIKit Dynamics
- Simulating gravity, collisions, and elasticity
- Creating custom behaviors
With iOS 7 came flat textures devoid of gradients and out went skeuomorphic design that mimicked real-life physical objects. There was also the addition of parallax, which made interface objects appear to be three-dimensional by altering their position ever so slightly depending on the angle at which you’re holding your device. This parallax effect and many others can be achieved by using the new motion APIs in UIKit. Also, before iOS 7 you needed to dive into complex math and physics if you wanted to create realistic physics effects in your views. Now there’s also a whole new slew of APIs in UIKit Dynamics that you can use to create these realistic effects without having to be a mathematician. You’ll learn about both motion and dynamics in this chapter. Together we’ll build a fun little app that will serve as a catalog to showcase a few of the great things you can now do.