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

moving to SWIFT (slowly…)

I’m learning swift. And these series of posts is about the troubles i am facing. Mostly because i did not spend enough time to completely understand the documentation, but also because swift changes fast and LOTS of examples and posts on the internet are already out of date.

For example i found heaps of broken “cellForRowAtIndexPath” implementations.

This one does work(as of today….):

Another one that was more difficult than anticipated was “prepareForSegue”

both viewcontrollers have an array of Objects as a member: