rickytan / RTRootNavigationController

Implicitly make every view controller has its own navigation bar
MIT License
2.15k stars 379 forks source link

大佬你好,我项目中的导航栏继承了你的RTRootNavigationController,然后项目中是UITabBarController作为根控制器,项目中也使用了FDFullscreenPopGesture来做全屏侧滑,我发现当我禁用了全屏侧滑的时候,系统的左边缘侧滑并没有失效,具体代码如下 #287

Closed clearlovelyQ closed 4 years ago

clearlovelyQ commented 4 years ago
  1. UITabbarController作为跟控制器

    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    self.window.backgroundColor = [UIColor whiteColor];
    self.mainTabBarController = [[ZJYTabBarController alloc] init];
    self.window.rootViewController = self.mainTabBarController;
    [self.window makeKeyAndVisible];

    2.UITabBarController里面代码,其中ZJYBaseNavigationController继承你的RTRootNavigationController

    
    - (void)setupChildViewControllers{
    
    ZJYDiscover_VC *discoverVC = [[ZJYDiscover_VC alloc] init];
    [self childViewController:discoverVC imageName:@"home_icon" selectedImageName:@"home_press_icon" withTitle:@"发现"];
    
    ZJYMarket_VC *marketVC = [[ZJYMarket_VC alloc] init];
    [self childViewController:marketVC imageName:@"Newsletter_icon" selectedImageName:@"Newsletter_press_icon" withTitle:@"行情"];
    
    ZJYMine_VC *mineVC = [[ZJYMine_VC alloc] init];
    [self childViewController:mineVC imageName:@"Quotes_icon" selectedImageName:@"Quotes_press_icon" withTitle:@"我的"];
    }


出现问题: 在A中全屏侧滑确实是禁止了,但是当我从屏幕边缘左侧侧滑,侧滑效果还是有的,不知道是不是我的用法不正确,请大佬看到了,给予帮助解答,谢谢
immustard commented 4 years ago

我的和你的情况一样, 是这么做的.

    self.rt_disableInteractivePop = YES;
    self.rt_navigationController.fd_fullscreenPopGestureRecognizer.enabled = NO;
bolee commented 4 years ago

我的和你的情况一样, 是这么做的.

    self.rt_disableInteractivePop = YES;
    self.rt_navigationController.fd_fullscreenPopGestureRecognizer.enabled = NO;

这个是对的

my-lsk commented 2 years ago

使用的CYLTabBarController吧 @clearlovelyQ

immustard commented 2 years ago

您好,您的邮件已经收到。