chennyhuang/LeftSlide

导航栏顶部没有完全显示

Opened this issue · 1 comments

leftslide

运行环境:xcode9.0.1 模拟器: 8plus layer层显示_UIBarBackground的高度是变的和UINavigationBar高度一样了(变低了)。下图是主页面的layer层级显示:

2017-10-21 10 23 08

问题已解决:在AppDelegate.m中:设置导航栏的背景图片。
// [[UINavigationBar appearance] setBarTintColor:[UIColor purpleColor]];
[self.mainNavigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"bgImage"] forBarMetrics:UIBarMetricsDefault];