rubymotion/teacup — pull request #155 by ahmeij (2014-03-19 12:34:33+00:00)
Title: Add identifier to constraints

Add identifier as a configurable option.

constraint_height(40).identifier("my_height")

use like this (console example)

a(25).get_ns_constraints.select{|c| c.identifier == "height"}.first

Weird unrelated fact, the a(25).constraints is always [] (blank array) and does not contain the constraints.

This way constraints can be programmatically looked up. Unfortunately changing them dynamically does not work because the get_ns_constrains does not list the constraints by reference :(