Skip to content

Instantly share code, notes, and snippets.

@JigarM
Last active August 29, 2015 14:24
Show Gist options
  • Save JigarM/03b82fbddee93e71e298 to your computer and use it in GitHub Desktop.
Save JigarM/03b82fbddee93e71e298 to your computer and use it in GitHub Desktop.
iOS 8.3 crashes when installing constraints on views.
//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