diff --git a/Source/ConstraintViewDSL.swift b/Source/ConstraintViewDSL.swift index 298bdb1..a0187f9 100644 --- a/Source/ConstraintViewDSL.swift +++ b/Source/ConstraintViewDSL.swift @@ -55,7 +55,7 @@ public struct ConstraintViewDSL: ConstraintAttributesDSL { get { return self.view.contentHuggingPriority(for: .horizontal).rawValue } - set { + nonmutating set { self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .horizontal) } } @@ -64,7 +64,7 @@ public struct ConstraintViewDSL: ConstraintAttributesDSL { get { return self.view.contentHuggingPriority(for: .vertical).rawValue } - set { + nonmutating set { self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .vertical) } } @@ -73,7 +73,7 @@ public struct ConstraintViewDSL: ConstraintAttributesDSL { get { return self.view.contentCompressionResistancePriority(for: .horizontal).rawValue } - set { + nonmutating set { self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .horizontal) } } @@ -82,7 +82,7 @@ public struct ConstraintViewDSL: ConstraintAttributesDSL { get { return self.view.contentCompressionResistancePriority(for: .vertical).rawValue } - set { + nonmutating set { self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .vertical) } }