I am trying to set the below constraint to one of my floating view.
leftConstraint = [NSLayoutConstraint constraintWithItem:detailView
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:0.0
constant:VIEW_WIDTH];
The view will be moved horizontally and has a fixed width. I couldn't pin this view to any other view. I will be changing the constant value in the constraint to move it over my view.
When I run the above the constraint in XCode 6.3, am getting the below error. "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"
I am not sure why this creates an illegal constraint.
To bypass this issue, I am using the 0.001 multiplier, but thats not going to work in all cases. So looking for an better workaround to this requirement.