From 15db280f57370912e3b0eaaf1f9f850090752cbc Mon Sep 17 00:00:00 2001 From: kean Date: Wed, 16 Mar 2016 15:12:17 +0300 Subject: [PATCH] LayoutGuides now have translatesAutoresizingMaskIntoConstraints set false be default --- Sources/AlignedLayoutArrangement.swift | 1 - Sources/DistributionLayoutArrangement.swift | 2 -- Sources/Internal.swift | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Sources/AlignedLayoutArrangement.swift b/Sources/AlignedLayoutArrangement.swift index c5ad207..6752bbf 100644 --- a/Sources/AlignedLayoutArrangement.swift +++ b/Sources/AlignedLayoutArrangement.swift @@ -13,7 +13,6 @@ class AlignedLayoutArrangement: LayoutArrangement { override init(canvas: StackView) { spacer = LayoutSpacer() spacer.accessibilityIdentifier = "ASV-alignment-spanner" - spacer.translatesAutoresizingMaskIntoConstraints = false super.init(canvas: canvas) } diff --git a/Sources/DistributionLayoutArrangement.swift b/Sources/DistributionLayoutArrangement.swift index c437217..075724c 100644 --- a/Sources/DistributionLayoutArrangement.swift +++ b/Sources/DistributionLayoutArrangement.swift @@ -16,7 +16,6 @@ class DistributionLayoutArrangement: LayoutArrangement { override init(canvas: StackView) { spacer = LayoutSpacer() spacer.accessibilityIdentifier = "ASV-alignment-spanner" - spacer.translatesAutoresizingMaskIntoConstraints = false super.init(canvas: canvas) } @@ -66,7 +65,6 @@ class DistributionLayoutArrangement: LayoutArrangement { private func updateGapLayoutGuides() { visibleItems.forPair { previous, current in let gap = GapLayoutGuide() - gap.translatesAutoresizingMaskIntoConstraints = false canvas.addSubview(gap) gaps.append(gap) diff --git a/Sources/Internal.swift b/Sources/Internal.swift index de1605d..206bc11 100644 --- a/Sources/Internal.swift +++ b/Sources/Internal.swift @@ -10,6 +10,7 @@ class LayoutGuide: UIView { super.init(frame: frame) // Make sure that layout guides don't interfere with touches self.hidden = true + self.translatesAutoresizingMaskIntoConstraints = false } required init?(coder aDecoder: NSCoder) {