常用导航条设置

去黑色阴影

[self.navigationController.navigationBar setShadowImage:[UIImage new]];

设置阴影

self.navigationController.navigationBar.layer.shadowColor = [UIColor blackColor].CGColor;
self.navigationController.navigationBar.layer.shadowOffset = CGSizeMake(0, 5);
self.navigationController.navigationBar.layer.shadowOpacity = 0.2;

设置Title

[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:16]}];

重新设置手势代理,用于自定义leftItem自定义后依然可用左滑手势

self.navigationController.interactivePopGestureRecognizer.delegate = self;

导航条背景图片

[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"AlbumListViewBkg"] forBarMetrics:0];

导航条不透明

self.navigationController.navigationBar.translucent = NO;

后面会陆续更新~~~

你可能感兴趣的:(常用导航条设置)