animating positions in autolayout

Animations in Swift are pretty straight forward:

but if the position of an element was done by “autolayout” the order is a bit more tricky.

Step 1: you need to set up the connection in “Interface Builder” to a member like this:

Step 2: the animation:

valid as of Swift 2.1, found here

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.