我有一个应用程序,它使用主故事板包含一个导航控制器,其中主视图是使用原型单元格内容的表视图.表格视图中的每个单元格都会推送到我使用它自己的一组 .h .m 和 .xib 文件创建的新视图上.
I have an application which uses a main story board to include a Navigation Controller where the main view is a Table View using a prototype cell content. Each cell in the table view pushes onto a new view which I have created with it's own set of .h .m and .xib files.
表格视图导航栏的标题通过故事板设置,效果很好.但是,在将每个新视图推入视图后,我无法为其设置标题.
The table view navigation bar has its title set through the story board which works fine. However, I am having trouble setting the title for each new view after it gets pushed into view.
我在每个视图的 viewDidLoad 方法中都有以下内容;
I have the following in the viewDidLoad method for each view;
self.title = @"View Title";
有什么建议吗?
这是正确的方法.它会起作用的.
it is the right way. it will work.
这篇关于设置 UINavigationBar 的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!