-
-
Save JigarM/03b82fbddee93e71e298 to your computer and use it in GitHub Desktop.
iOS 8.3 crashes when installing constraints on views.
This file contains 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
//A multiplier of 0 or a nil second item together with a location for the first attribute creates | |
//an illegal constraint of a location equal to a constant. Location attributes must be specified in | |
//pairs. | |
// OR | |
//[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: | |
//A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal | |
//constraint of a location equal to a constant. Location attributes must be specified in pairs' | |
//Use | |
NSLayoutConstraint *constraint = [NSLayoutConstraint constraintWithItem:self.view1 | |
attribute:NSLayoutAttributeRight | |
relatedBy:NSLayoutRelationEqual | |
toItem:self.view2 | |
attribute:NSLayoutAttributeLeft | |
multiplier:1 | |
constant:0]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment