繁体   English   中英

在iPhone视图中更改标题的颜色和背景

[英]Change the color & background of title in iPhone view

我有一个标签栏控制器作为根控制器。 在其第一个选项卡中,我有一个包含未分组表视图的导航控制器

截图位于 - http://sankalplabs.files.wordpress.com/2011/04/screen-shot-2011-04-05-at-11-17-10-am.png

(因为我是这个论坛的新手,不允许我上传图片)

现在我想改变标题“Smart Analytics”的颜色和背景。 我尝试使用标签并将其放在标题上。 但它没有奏效。 这样做的方法是什么?

self.navigationController.tintColor = [UIColor greenColor];
use this

self.navigationController.navigationBar.tintColor = [UIColor greenColor];

尝试使用UINavigationItem titleView属性

@property(nonatomic, retain) UIView *titleView

可以像下面一样访问UIViewController继承的类。

self.navigationItem.titleView = myOwnLabel;

相关的SO帖子

在Interface Builder中更改UINavigationController UIViewController的Title视图

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM