本文介绍了导航栏在弹出时变黑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是当我弹出我的控制器时,导航栏变成黑色,这很烦人.需要帮助!

解决方案

当您弹出屏幕时,您会返回上一屏幕.在预览屏幕中,您必须在 viewWillAppear 中调用此方法.

-(void) viewWillAppear: (BOOL)animated{[self.navigationController setNavigationBarHidden:YES 动画:动画];[超级viewWillAppear:动画];}

这对我有用.

Second Image

The issue is when i pop my controller the navigation bar becomes black which is very irritating. Help required!

解决方案

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.

这篇关于导航栏在弹出时变黑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 10:40