diff --git a/Source/Constraint.swift b/Source/Constraint.swift index de19995..b93a8d9 100644 --- a/Source/Constraint.swift +++ b/Source/Constraint.swift @@ -118,7 +118,9 @@ public class Constraint { layoutToAttribute = layoutFromAttribute } #else - if layoutToAttributes.count > 0 { + if self.from.attributes == self.to.attributes { + layoutToAttribute = layoutFromAttribute + } else if layoutToAttributes.count > 0 { layoutToAttribute = layoutToAttributes[0] } else { layoutToAttribute = layoutFromAttribute