ios中导航栏的设置

xiaoxiao2021-02-28  98

[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;//设置在返回时候显示按钮
转载请注明原文地址: https://www.6miu.com/read-34035.html

最新回复(0)