How to set height programmatically autolayout

Check out How to set height programmatically autolayout by JR. Here is an excerpt:

You can set the height and width visually like this.

    NSArray *foo1 = [NSLayoutConstraint constraintsWithVisualFormat:@"V:[clearSearchButton(==searchBar)]" options:0 metrics:nil views:views];
    NSArray *foo2 = [NSLayoutConstraint...

The full article is available here.