From 9cfa00c5331b7d9838792b8cf756a6bfc5f4b058 Mon Sep 17 00:00:00 2001 From: "Christiano, Kevin" Date: Thu, 20 Jun 2019 09:20:45 -0400 Subject: [PATCH] Further improved label dynamic sizing. --- MVMCoreUI/Atoms/Views/LeftRightLabelView.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atoms/Views/LeftRightLabelView.swift b/MVMCoreUI/Atoms/Views/LeftRightLabelView.swift index bb11374e..1ca1402a 100644 --- a/MVMCoreUI/Atoms/Views/LeftRightLabelView.swift +++ b/MVMCoreUI/Atoms/Views/LeftRightLabelView.swift @@ -73,8 +73,9 @@ import Foundation if leftTextLabel.hasText && rightTextLabel.hasText { let padding = MFStyler.defaultHorizontalPadding(forSize: size) * 2 let maximumTextWidth = (size - (padding + 16)) * 0.4 - rightTextLabel.preferredMaxLayoutWidth = round(maximumTextWidth) - } else { + // Subtracting 10 resolves issues of SE and iPad + rightTextLabel.preferredMaxLayoutWidth = round(maximumTextWidth) - 10 + } else { rightTextLabel.preferredMaxLayoutWidth = 0 } }