From 6a2405989dc241916db3b91547f960f014e2e091 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Tue, 20 Aug 2019 10:00:07 -0400 Subject: [PATCH] Fixes to ambiguity --- MVMCoreUI/Molecules/CornerLabels.swift | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/MVMCoreUI/Molecules/CornerLabels.swift b/MVMCoreUI/Molecules/CornerLabels.swift index f1c33e4d..2a2ad379 100644 --- a/MVMCoreUI/Molecules/CornerLabels.swift +++ b/MVMCoreUI/Molecules/CornerLabels.swift @@ -69,6 +69,9 @@ import UIKit return } + topRightLabel.textAlignment = .right + bottomRightLabel.textAlignment = .right + addSubview(topLabelsView) addSubview(bottomLabelsView) topLabelsView.topAnchor.constraint(equalTo: layoutMarginsGuide.topAnchor).isActive = true @@ -96,11 +99,11 @@ import UIKit topLabelsView.bottomAnchor.constraint(greaterThanOrEqualTo: topRightLabel.bottomAnchor).isActive = true var constraint = topLabelsView.bottomAnchor.constraint(equalTo: topLeftLabel.bottomAnchor) - constraint.priority = .defaultHigh + constraint.priority = topLeftLabel.contentHuggingPriority(for: .vertical) - 10 constraint.isActive = true constraint = topLabelsView.bottomAnchor.constraint(equalTo: topRightLabel.bottomAnchor) - constraint.priority = .defaultHigh + constraint.priority = topRightLabel.contentHuggingPriority(for: .vertical) - 10 constraint.isActive = true bottomLeftLabel.topAnchor.constraint(equalTo: bottomLabelsView.topAnchor).isActive = true @@ -111,11 +114,11 @@ import UIKit bottomLabelsView.bottomAnchor.constraint(greaterThanOrEqualTo: bottomRightLabel.bottomAnchor).isActive = true constraint = bottomLabelsView.bottomAnchor.constraint(equalTo: bottomLeftLabel.bottomAnchor) - constraint.priority = .defaultHigh + constraint.priority = bottomLeftLabel.contentHuggingPriority(for: .vertical) - 10 constraint.isActive = true constraint = bottomLabelsView.bottomAnchor.constraint(equalTo: bottomRightLabel.bottomAnchor) - constraint.priority = .defaultHigh + constraint.priority = bottomRightLabel.contentHuggingPriority(for: .vertical) - 10 constraint.isActive = true }