导航条颜色

//导航条背景颜色

self.navigationController.navigationBar.barTintColor = [UIColor blueColor];

//导航条上面控件颜色

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

//设置系统导航条的title字体大小和颜色

[self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17],NSForegroundColorAttributeName:[UIColor whiteColor]}];

老是记不住。。

时间: 2024-08-09 01:35:37

导航条颜色的相关文章

导航条、状态条高亮状态改变

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch

iphone中UINavigationBar(导航条视图)的介绍

多视图应用程序中,我们常常使用到自定义UINavigationBar来完成导航条的设置. 1.创建一个导航条 UINavigationBar *navigationBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)]; 2.有了导航条以后,必须在导航条上设置一个item集合,用来放置中间的标题,和左右的按钮,因为上面空间有限,只有左右两个按钮. //创建一个导航条集合 UINavigationItem *n

UINavigationController改变UINavigationBar导航条标题颜色跟字体

UINavigationController改变UINavigationBar导航条标题颜色和字体 iOS 5 以后 UINavigationController 可以 改变UINavigationBar导航条标题颜色和字体 [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor colorWithRed:0 green

定制导航条的颜色

self.navigationController.navigationBar.barTintColor =[UIColor colorWithRed:70/255.0green:193/255.0 blue:14/255.0 alpha:1.0]; // 设置导航条的透明 //    [self setSelfNavigationBarTranslucent]; //- (void)setSelfNavigationBarTranslucent //{ //    if (self.navig

导航条的自定义:背景颜色设置,按钮标题图片设置,图片坐标修改

一.修改系统原生导航条 修改导航条背景颜色 self.navigationController.navigationBar.barTintColor = [UIColor colorWithHexString:@"#2295f2"]; 自定义导航条按钮 self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"btn-menu-h&q

【代码笔记】改变导航条标题的颜色为红色

一,效果图. 二,代码. RootViewController.m - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. [email protected]"I love you"; //改变导航条标题的颜色为红色 [self.navigationController.navigationBar setTitleTextAttributes:@{NSFo

自定义导航条的颜色

才发现,导航条的颜色是可以进行修改的. #import "AppDelegate.h" #import "RootViewController.h" @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWin

改变导航条标题的颜色为红色

一,效果图. 二,代码. RootViewController.m - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.title=@"I love you"; //改变导航条标题的颜色为红色 [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegro

iOS6 导航条title字体和颜色-不适用自定义视图

一般的我们都是通过自定义视图来设置导航条的title颜色和字体的 UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 40)]; titleLabel.text = @"详情"; titleLabel.textColor = [UIColor whiteColor]; titleLabel.textAlignment = NSTextAlignmentCenter; self.naviga