diff --git a/MVMCoreUI/Atoms/Views/LeftRightLabelView.swift b/MVMCoreUI/Atoms/Views/LeftRightLabelView.swift index 81d9f2ff..bb11374e 100644 --- a/MVMCoreUI/Atoms/Views/LeftRightLabelView.swift +++ b/MVMCoreUI/Atoms/Views/LeftRightLabelView.swift @@ -72,7 +72,7 @@ import Foundation // Resolves text layout issues found between both dynamically sized labels, number is not exact but performs as required. if leftTextLabel.hasText && rightTextLabel.hasText { let padding = MFStyler.defaultHorizontalPadding(forSize: size) * 2 - let maximumTextWidth = (size - (padding + 16 + layoutMargins.left + layoutMargins.right)) * 0.4 + let maximumTextWidth = (size - (padding + 16)) * 0.4 rightTextLabel.preferredMaxLayoutWidth = round(maximumTextWidth) } else { rightTextLabel.preferredMaxLayoutWidth = 0 diff --git a/MVMCoreUI/Atoms/Views/ViewConstrainingView.m b/MVMCoreUI/Atoms/Views/ViewConstrainingView.m index a7412b93..02d965b7 100644 --- a/MVMCoreUI/Atoms/Views/ViewConstrainingView.m +++ b/MVMCoreUI/Atoms/Views/ViewConstrainingView.m @@ -274,6 +274,11 @@ [super setupView]; self.translatesAutoresizingMaskIntoConstraints = NO; self.backgroundColor = [UIColor clearColor]; + if (@available(iOS 11.0, *)) { + self.directionalLayoutMargins = NSDirectionalEdgeInsetsZero; + } else { + self.layoutMargins = UIEdgeInsetsZero; + } } - (void)updateView:(CGFloat)size {