On iOS 8 beta 4, this constraint:
[NSLayoutConstraint constraintWithItem:_galleryView
attribute:NSLayoutAttributeLeading
relatedBy:NSLayoutRelationEqual
toItem:self.view
attribute:NSLayoutAttributeLeft
multiplier:1.0f
constant:0];
causes the following exception to be thrown:
Fatal Exception: NSInvalidArgumentException
*** +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]:
A constraint cannot be made between a leading/trailing attribute and a right/left attribute.
Use leading/trailing for both or neither.
And yes, the constraint doesn't make much sense to begin with, but it did work on iOS 7.