In iOS 15 soft hyphens (\u{00AD}) are not considered when setting text on UILabel
. for example: The following code does render the text with the soft hyphen correctly in iOS 13 & 14, but not in iOS 15.
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var label: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
label.text = "Very\u{00AD}VeryVeryVeryVeryVeryLongWordWithASoftHyphenTo"
}
}
How can i make UILabel consider the soft hyphen (\u{00AD}) in iOS 15?