IOS关于设置导航栏的一些总结

[[UIBarButtonItemappearance]setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) forBarMetrics:UIBarMetricsDefault];//隐藏导航栏的“back”字样

NAVIGATIONBARCOLOR self.navigationController.navigationBar.barTintColor=[UIColor colorWithRed:105.0/255 green:125.0/255 blue:141.0/255 alpha:1]//设置导航栏颜色

[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}]//设置导航栏字体的颜色和大小

self.navigationItem.title=@“标题”//设置导航栏显示标题


self.navigationController.navigationBarHidden=YES;隐藏导航栏


 self.navigationController.navigationBar.tintColor=[UIColor whiteColor];//改变导航条上按钮的颜色如返回按钮







猜你喜欢

转载自blog.csdn.net/u010401245/article/details/52224249
今日推荐