I think this function could use a bit of cleanup but I can't really show you what I'm thinking because github doesn't have multiline select.

Basically, below in updateConstraints you have an array and you add values to it and then add constraints at the end.  I think that would be helpful here.  Bunch all the constraints for a particular view together, and then add them at once.  In addition a bit more commenting of what the expected layout should be would be helpful.