在viewWillAppear的时候设置
UIImage *barImage = [[NDImgServer shareInstance] createImageWithColor:[UIColor colorWithRed:255 green:255 blue:255 alpha:0.1ff]];
[self.navigationController.navigationBar setBackgroundImage:barImage forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:[UIImage new]];
在viewWillDisappear设置
[self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:nil];
这样 就不会影响其他controller, 不必隐藏导航栏
阅读(1096) | 评论(0) | 转发(0) |