版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/walkerwqp/article/details/81740858
self.navigationController.navigationBar.barStyle = UIStatusBarStyleLightContent;
UIView* stateView = [[UIView alloc] initWithFrame:CGRectMake(0, -20, Device_Width, 20)];
[self.navigationController.navigationBar addSubview:stateView];
stateView.backgroundColor = [UIColor colorWithRed:69/255.0 green:155/255.0 blue:118/255.0 alpha:1];