[英]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.