Site icon Accidentally in Code

#iOSDevUK: UIKit Dynamics

My notes from Simon‘s excellent talk at iOSDevUK [his slides].

Physics for UIKit.

“Visual layers and realistic motion impart vitality and heighten users’ delight and understanding”

Buttons used to look like buttons, now they don’t. Don’t have visual cues. Compensate using Dynamics to add some motion.

Not for flappy birds. Has tried it, can get most of the way there. But there are fundamental missing parts. This is the road to disaster. Not what it is designed for, there are better frameworks out there.

How it works:

UIDynamicItem

UIDynamicAnimator

UIDynamicBehavior

Built in behaviours:

Gotcha

Animators pause when nothing left to animate. what happens when it goes outside bounds?

Actually view continues accelerating as it falls down towards the centre of the earth.

This is bad because UIViews are flammable. If carried on unchecked, the earth explodes. Which is bad because kittens will die.

Stopping the animation:

Basics. This is it, no hidden complicated stuff.

Tweetbot uses excessively extensively.

Summary:

Do:

Don’t:

Exit mobile version