I have a problem with Cocoa Auto Layout and can\'t get my head around this problem. All I\'d like to achieve is to have two buttons always centered in a view as depicted below.<
Another trick to do this is to align the right side of button
to be half the size of the space away from the Center of superview
, and the left side of button2
to be half the size of the space away from the Center of superview
.
This only really works if you have a superview that only surrounds the two views you want to centre though.