summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2022-07-27 14:46:55 +0200
committerAndrej Mihajlov <and@mullvad.net>2022-07-27 14:46:55 +0200
commit469efb8d3d0a395a3ddbf9a1506d457256a94f45 (patch)
treea056d82a3d099c28cf4b294c99c6170abad44ee9
parentf40a84d21a31d0edfb144bf7dc45de820d477712 (diff)
parent1cd58ab3c02eae06e8fcc22ea5f2185abdc7380c (diff)
downloadmullvadvpn-469efb8d3d0a395a3ddbf9a1506d457256a94f45.tar.xz
mullvadvpn-469efb8d3d0a395a3ddbf9a1506d457256a94f45.zip
Merge branch 'notification-banner-line-break'
-rw-r--r--ios/MullvadVPN/NotificationBannerView.swift8
-rw-r--r--ios/MullvadVPN/TermsOfServiceContentView.swift2
2 files changed, 8 insertions, 2 deletions
diff --git a/ios/MullvadVPN/NotificationBannerView.swift b/ios/MullvadVPN/NotificationBannerView.swift
index e8b14a2988..5c46fabd74 100644
--- a/ios/MullvadVPN/NotificationBannerView.swift
+++ b/ios/MullvadVPN/NotificationBannerView.swift
@@ -41,6 +41,10 @@ class NotificationBannerView: UIView {
textLabel.textColor = UIColor.InAppNotificationBanner.titleColor
textLabel.numberOfLines = 0
textLabel.lineBreakMode = .byWordWrapping
+ if #available(iOS 14.0, *) {
+ // See: https://stackoverflow.com/q/46200027/351305
+ textLabel.lineBreakStrategy = []
+ }
return textLabel
}()
@@ -51,6 +55,10 @@ class NotificationBannerView: UIView {
textLabel.textColor = UIColor.InAppNotificationBanner.bodyColor
textLabel.numberOfLines = 0
textLabel.lineBreakMode = .byWordWrapping
+ if #available(iOS 14.0, *) {
+ // See: https://stackoverflow.com/q/46200027/351305
+ textLabel.lineBreakStrategy = []
+ }
return textLabel
}()
diff --git a/ios/MullvadVPN/TermsOfServiceContentView.swift b/ios/MullvadVPN/TermsOfServiceContentView.swift
index 4e18593681..1f2740bbfb 100644
--- a/ios/MullvadVPN/TermsOfServiceContentView.swift
+++ b/ios/MullvadVPN/TermsOfServiceContentView.swift
@@ -25,8 +25,6 @@ class TermsOfServiceContentView: UIView {
)
titleLabel.lineBreakMode = .byWordWrapping
if #available(iOS 14.0, *) {
- // Disable the new line break strategy used by UIKit that moves at least two words
- // to the next line which makes the title look odd.
// See: https://stackoverflow.com/q/46200027/351305
titleLabel.lineBreakStrategy = []
}