Make ConstraintViewDSL content priorities nonmutating (#586)

This commit is contained in:
Vitalii Budnik 2019-06-10 15:33:33 +03:00 committed by Robert Payne
parent 04e9c890aa
commit 222e14ab37
1 changed files with 4 additions and 4 deletions

View File

@ -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)
}
}