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 }