I'm trying to change the Vertical Space constraint of a View that contains a button and a progress bar. The following picture shows the constraint:
The button is aligned both horizontal and vertically within the view:
It is referenced as an IBOutlet
and changed programmatically in viewDidLoad
in this way:
// Constraing originally set to 15.0 in Interface Builder
if (isiPhone5) {
[SSLayoutConstraintButtonVSpace setConstant:0.0f];
} else {
[SSLayoutConstraintButtonVSpace setConstant:15.0f];
}
Once I run the app with an iPhone 5, the change is done well and apparently it seems to work. However, if I click on the button, id does not respond as it should. It seems that the button click area still remains in the original position before setting the new constraint.
Does anybody know what is going on there?