设置UINavigationBar的标题 [英] Setting title of UINavigationBar

查看:93
本文介绍了设置UINavigationBar的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序使用主故事板来包括导航控制器,其中主视图是使用原型单元格内容的表视图。表视图中的每个单元格都推送到一个新视图,我已使用它自己的一组.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的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆