我正在其中一个应用程序中的导航栏中添加大标题.问题是标题有点长,所以我需要在大标题中添加两行.如何在导航栏中添加两行大标题?
这不是关于默认导航栏标题!这是关于iOS 11中引入的大标题.因此,请务必考虑大型标题来添加建议.谢谢
我正在尝试使用Swift在iOS 11中使用新的大型标题系统。当标题过长时(请参见图像示例),它会添加...而不是换行或缩小文本大小。如何添加换行符?

这是我用来设置标题的一些代码:
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"
Run Code Online (Sandbox Code Playgroud) 作为标题,有没有办法在UINavigationBar中拆分较长的大标题?
我尝试了所有这些方法,适用于iOS 11,但在iOS 13上我似乎都无法使用