单军华
2018-07-12 3e8437ae559487362fae3525beb79c534c213a51
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
//  LMJNavigationController.m
//  PLMMPRJK
//
//  Created by NJHu on 2017/3/31.
//  Copyright © 2017年 GoMePrjk. All rights reserved.
//
 
#import "LMJNavigationController.h"
 
@interface LMJNavigationController ()
 
/** 系统的右划返回功能的代理记录 */
//@property (nonatomic, strong) id popGesDelegate;
 
@end
 
@implementation LMJNavigationController
 
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationBar.hidden = YES;
    
 
    [self setupPOPGes];
}
/*
#pragma mark - 全局侧滑代码------------BEGIN----
- (void)getSystemGestureOfBack
{
    // 记录系统的pop代理
    UIPanGestureRecognizer *panGes = [[UIPanGestureRecognizer alloc] initWithTarget:self.interactivePopGestureRecognizer.delegate action:NSSelectorFromString(@"handleNavigationTransition:")];
    
    [self.view addGestureRecognizer:panGes];
    
    panGes.delegate = self;
    
    // 禁止之前的手势
    self.interactivePopGestureRecognizer.enabled = NO;
    
}
 
 
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
{
    // 非根控制器才能触发
    return self.childViewControllers.count > 1;
}
#pragma mark - 全局侧滑代码------------END----
*/
 
- (void)setupPOPGes
{
    self.fd_viewControllerBasedNavigationBarAppearanceEnabled = NO;
}
 
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
//    if (self.childViewControllers.count != 0) {
//        viewController.hidesBottomBarWhenPushed = YES;
//    }
    
    [super pushViewController:viewController animated:animated];
}
 
 
@end