问题描述
我在 UINavigationController 中嵌入了一个 UITableView 和一个详细信息视图:我想为我的笔记"打开大标题,但我想打开它关闭详细视图.类似于默认邮件应用程序在 iPhone 上的工作方式.我将如何在该转场期间更改导航栏的 prefersLargeTitle
属性?
I have a UITableView and a Detail View embedded in a UINavigationController as so: I would like to turn on large titles for "My Notes" but I'd like to turn it off for the detail view. Something like how the default Mail app works on iPhone. How would I change the navigation bar's prefersLargeTitle
property during that segue?
推荐答案
很简单.
在您的 DetailView 中,您应该将 navigationItem.largeTitleDisplayMode 设置为 .never
In your DetailView you should set navigationItem.largeTitleDisplayMode to .never
(不是 navigationController?.navigationItem.largeTitleDisplayMode !!)
navigationItem.largeTitleDisplayMode = .never
这篇关于如何关闭 UINavigationBar 的大标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!