可可触摸:设置UINavigationController的标题不起作用 [英] Cocoa Touch: Setting UINavigationController's title doesn't work

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

问题描述

我没有使用[[self navigationController] setTitle:@测试标题"].这与我在其余应用程序中执行的方法相同.是什么原因造成的?

I've used [[self navigationController] setTitle:@"Test Title"] to no avail. This is the same way I do it in the rest of my app. What could cause this?

推荐答案

尝试设置导航项的标题.

Try setting the title of the navigation item.

self.navigationItem.title = @"Test Title";

或者,如果您愿意,可以这样

Or like this if you prefer

[[self navigationItem] setTitle:@"Test Title"];

这篇关于可可触摸:设置UINavigationController的标题不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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