Skip to content

yjm2657/JMHiddenNavigationController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

JMHiddenNavigationController

iOS 隐藏导航相互跳转出现黑块,解决方案

关键代码

///导航代理 基类封装 在一个导航下导航公用
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
    ///设置需要隐藏的导航类数组
    [self setHiddenNavVCArr];
    
    BOOL isHiddenNav = NO;
    for (NSString *classStr in self.navigationController.hiddenVCNameArr) {
        if ([viewController isKindOfClass:NSClassFromString(classStr)]) {
            isHiddenNav = YES;
        }
    }
    ///判断并隐藏导航
    [navigationController setNavigationBarHidden:isHiddenNav animated:YES];
    if (isHiddenNav) {
        ///打开左滑返回手势
        self.navigationController.interactivePopGestureRecognizer.delegate = self;
    }
}

About

iOS 隐藏导航相互跳转出现黑块,解决方案

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published