You encounter errors because you mix and match the constraints generated in the code with the constraints added by the interface constructor. The interface designer does not allow you to create an ambiguous layout, so by definition, if you add additional restrictions, you will get the "Unable to simultaneously satisfy" , which is the fall of many marriages.
To solve this problem, you either need to define all the restrictions that you need in the interface builder, or you need to mark certain objects as outputs and delete them in the code before adding your own.
In your case, the restrictions are simple enough to create in IB.
You can click on a specific height using this button in IB when your shortcut is selected:

The one in the middle looks like a beam. This gives you the following useful menu:

Selecting one of them allows you to create a new constraint for the label, which you can then edit by selecting it:

Then you can add your buttons, select all three of them and, using the same menu, create a restriction of equal heights.
Constraints created in IB are not particularly flexible, so if you decide that you need to create or modify them in your code, it is best to create output for certain constraints, and then either delete or recreate them, or change the constant value to lead time.
jrturton Nov 16 '12 at 19:03 2012-11-16 19:03
source share