xcodeはタイトルのどの部分を停止したいのか、またどの部分を再開したいのかを検出することができないため、自分で行う必要があります。
override func viewDidLoad() {
super.viewDidLoad()
self.navigationItem.title = "Heal the world make it a better place for you and for me and the entire human race"
setNavTitle(title: self.navigationItem.title!)
}
func setNavTitle(title: String)
{
//get the last 10 characters of your title, change the number to your need
let last10 = title.substring(from:title.index(title.endIndex, offsetBy: -14))
//get the first 10 characters of your title, change the number to your need
let first10 = title.substring(to: title.index(title.startIndex, offsetBy: 14))
//concatenate the strings
let title = first10 + " ... " + last10
self.navigationItem.title = title
}
あなたが何をしようとしているのか、より多くの文脈を質問に提供できれば助けになります。私たちにいくつかのコードを教えてください。 – Jeet
詳細を説明すると良いでしょう... –
追加された例 – YogevSitton