您的位置:首页 > 移动开发 > IOS开发

ios中导航栏的设置

2017-07-11 09:10 176 查看
[self.navigationItem.leftBarButtonItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIFont boldSystemFontOfSize:15],NSFontAttributeName, nil] forState:UIControlStateNormal];//设置左边按钮字体的大小
self.navigationController.navigationBar.tintColor = [UIColor grayColor];
//设置按钮文字的的颜色
[self.navigationController.navigationBar setTitleTextAttributes:
@{NSFontAttributeName:[UIFont systemFontOfSize:19],
NSForegroundColorAttributeName:[UIColor redColor]}];//设置导航栏字体的大小和颜色
self.hidesBottomBarWhenPushed=YES;//设置在push的时候隐藏tabbar
[self.navigationController pushViewController:view1 animated:YES];
self.hidesBottomBarWhenPushed=NO;//设置在返回时候显示按钮
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: