ios改变导航栏颜色及其字体颜色

来源:互联网 发布:json添加键值对 编辑:程序博客网 时间:2024/05/25 23:27
改变系统导航栏颜色 [self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:237/255.0 green:10/255.0 blue:34/255.0 alpha:1.0]];改变导航栏字体颜色[self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:22],    NSForegroundColorAttributeName:[UIColor whiteColor]}];返回按钮UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:nil action:nil];    self.navigationItem.backBarButtonItem = item;
0 0
原创粉丝点击