Skip to content

Instantly share code, notes, and snippets.

@spacedrabbit
Created December 9, 2014 03:40
Show Gist options
  • Save spacedrabbit/5cc35a105db11623bbab to your computer and use it in GitHub Desktop.
Save spacedrabbit/5cc35a105db11623bbab to your computer and use it in GitHub Desktop.
-(void)awakeFromNib{
NSDictionary * catImageReferences = NSDictionaryOfVariableBindings(_topLeftCat, _topRightCat, _bottomLeftCat, _bottomRightCat);
NSDictionary * catMetrics = @{ @"catImageWidth" : [NSNumber numberWithFloat:150.0],
@"catImageHeight" : [NSNumber numberWithFloat:120.0]
};
NSArray * topRowOfCats = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[_topLeftCat(==catImageWidth)]-10-[_topRightCat]-|"
options:0
metrics:catMetrics
views:catImageReferences];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment