In iOS 15, Soft hyphen is not working properly when using unicode character in UILabel


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() {
    label.text = "Veryu{00AD}VeryVeryVeryVeryVeryLongWordWithASoftHyphenTo"

enter image description here

How can i make UILabel consider the soft hyphen (u{00AD}) in iOS 15?

Source: Ios Questions

Categorised as ios, ios15, soft-hyphen, swift, uilabel Tagged , , , ,


Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us