http://www.hangge.com/blog/cache/detail_957.html
修改返回按鈕
//修改導航條背景色(紅褐色)
self.navigationController.navigationBar.barTintColor = RGB(175, 24, 50, 1.0);
其中RGB為我的工程里的一個宏定義:
#define RGB(r,g,b,a) [UIColor colorWithRed:(r/255.0) green:(g/255.0) blue:(b/255.0) alpha:(a)]
//修改導航條標題顏色(白色)
[self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName,nil]];
//修改導航條添加的按鈕(item)顏色(黃色)
self.navigationController.navigationBar.tintColor = [UIColor yellowColor];
需要注意一點: 這個設置完成之后殿衰,從他push過去的頁面顏色都是這種效果朱庆。
---設置tabbar圖片####
/**
消息
*/
Message *message =[[Message alloc]init];
UIImage *mImage = [UIImage imageNamed:@"oneUnSelect"];
UIImage *selectmImage = [UIImage imageNamed:@"oneSelect"];
mImage = [mImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
selectmImage = [selectmImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
message.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"消息" image:mImage selectedImage:selectmImage];
NavigationController *messageNa = [[NavigationController alloc]initWithRootViewController:message];