问题
Second Image
The issue is when i pop my controller the navigation bar becomes black which is very irritating. Help required!
回答1:
When you Pop Your Screen You get back to Previous Screen. In Preview screen you have to call this method in viewWillAppear.
-(void) viewWillAppear: (BOOL)animated{
[self.navigationController setNavigationBarHidden:YES animated:animated];
[super viewWillAppear:animated];
}
This will work for me.
回答2:
This is the Swift version of @Nikunj answer.
override func viewWillAppear(_ animated: Bool) {
navigationController?.setNavigationBarHidden(true, animated: animated)
super.viewWillAppear(animated)
}
来源:https://stackoverflow.com/questions/34654934/navigationbar-becomes-black-on-pop