summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2022-05-30 13:42:07 +0200
committerAndrej Mihajlov <and@mullvad.net>2022-05-30 13:42:07 +0200
commit8f6ea89db04b60b53fd1c25bf64dc6adf0760379 (patch)
tree35534d3e29ab5801411af8370e8bbe81856561f3
parent34ebf6a1eb1561a6e8d21dde3418b2f3cfa20bee (diff)
parentfb8c983aa074da972a88c89a60b2136a794b4ede (diff)
downloadmullvadvpn-8f6ea89db04b60b53fd1c25bf64dc6adf0760379.tar.xz
mullvadvpn-8f6ea89db04b60b53fd1c25bf64dc6adf0760379.zip
Merge branch 'multiline-location-cells'
-rw-r--r--ios/MullvadVPN/SelectLocationCell.swift8
1 files changed, 7 insertions, 1 deletions
diff --git a/ios/MullvadVPN/SelectLocationCell.swift b/ios/MullvadVPN/SelectLocationCell.swift
index 9cae5a6cfa..200add60c3 100644
--- a/ios/MullvadVPN/SelectLocationCell.swift
+++ b/ios/MullvadVPN/SelectLocationCell.swift
@@ -106,6 +106,12 @@ class SelectLocationCell: UITableViewCell {
locationLabel.font = UIFont.systemFont(ofSize: 17)
locationLabel.textColor = .white
+ locationLabel.lineBreakMode = .byWordWrapping
+ locationLabel.numberOfLines = 0
+ if #available(iOS 14.0, *) {
+ // See: https://stackoverflow.com/q/46200027/351305
+ locationLabel.lineBreakStrategy = []
+ }
tickImageView.tintColor = .white
@@ -135,7 +141,7 @@ class SelectLocationCell: UITableViewCell {
statusIndicator.centerYAnchor.constraint(equalTo: tickImageView.centerYAnchor),
locationLabel.leadingAnchor.constraint(equalTo: statusIndicator.trailingAnchor, constant: 12),
- locationLabel.trailingAnchor.constraint(greaterThanOrEqualTo: collapseButton.leadingAnchor, constant: 0),
+ locationLabel.trailingAnchor.constraint(lessThanOrEqualTo: collapseButton.leadingAnchor),
locationLabel.topAnchor.constraint(equalTo: contentView.layoutMarginsGuide.topAnchor),
locationLabel.bottomAnchor.constraint(equalTo: contentView.layoutMarginsGuide.bottomAnchor),