I am trying to use the new big title system in iOS 11 using Swift. When the title gets too long (see Example Image), it adds ... instead of breaking the line or reducing the size of the text. How to add line break?

Here is the code I use to customize the header:
self.navigationController?.navigationBar.prefersLargeTitles = true
self.navigationController?.navigationBar.largeTitleTextAttributes = [NSForegroundColorAttributeName: MyGlobalVariable.themeMainColor]
self.navigationController?.navigationBar.largeTitleTextAttributes = [NSFontAttributeName: UIFont.systemFont(ofSize: 22)]
navigationItem.title = "Search by Name"
source
share