Skip to content

Instantly share code, notes, and snippets.

@richy486
Created September 2, 2013 00:06
Show Gist options
  • Save richy486/6408141 to your computer and use it in GitHub Desktop.
Save richy486/6408141 to your computer and use it in GitHub Desktop.
[btnShare setTranslatesAutoresizingMaskIntoConstraints:NO];
NSDictionary *metrics = @{@"height":@44.0
, @"width":@44.0
, @"edgeSpace":@10.0};
NSDictionary *views = NSDictionaryOfVariableBindings(button);
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[button(width)]-edgeSpace-|" options:0 metrics:metrics views:views]];
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-edgeSpace-[button(height)]" options:0 metrics:metrics views:views]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment