Created
December 27, 2014 02:47
-
-
Save gazolla/76835584c7205218c8f6 to your computer and use it in GitHub Desktop.
Auto Layout - how to follow superview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSDictionary* views = @{@"collectionView": self.collection}; | |
NSArray* sHorizontal = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|[collectionView]|" | |
options:0 | |
metrics:nil | |
views:views]; | |
NSArray* sVertical = [NSLayoutConstraint constraintsWithVisualFormat:@"V:|[collectionView]|" | |
options:0 | |
metrics:nil | |
views:views]; | |
[self.view addConstraints:sHorizontal]; | |
[self.view addConstraints:sVertical]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment