O'Reilly logo

Mastering iOS 11 Programming - Second Edition by Donny Wals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding dynamism with UIKit Dynamics

Most apps implement simple animations like the ones we have already seen. However, some animations could benefit from a slightly more dynamic approach. This is what UIKit Dynamics are for. With UIKit Dynamics, you can place one or more view in a scene that emulates physics. For instance, you can apply gravity to a certain object, causing it to fall downward on the screen. You can even have objects bumping in to each other; if you assign a mass to your views, this mass is actually taken into account when two objects bump into each other. Or, for instance, when you apply a certain force to an object with very little mass, it will be displaced more than an object with a lot of mass, just like you would expect ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required