NavigationBar becomes black on pop

主宰稳场 提交于 2019-12-02 04:35:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!