From cd77008e2956c50866372e2da7bc85ea49faf45e Mon Sep 17 00:00:00 2001 From: Mac Date: Sat, 8 Apr 2017 19:18:23 +0800 Subject: [PATCH] =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E4=BA=86=E6=A1=86?= =?UTF-8?q?=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 6148 bytes FDFullscreenPopGesture/.DS_Store | Bin 0 -> 6148 bytes ...igationController+FDFullscreenPopGesture.m | 124 ++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 .DS_Store create mode 100644 FDFullscreenPopGesture/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..58d459e980d0e4decdb54f4982b0937e35b806a0 GIT binary patch literal 6148 zcmeHK%TB~F3>?EAR^qZJggE6F_=9Lw;EJ?AfCLqn(xQEE?x!<;04nst1+7-Ll#Jup zPBK!H8i1@1&o{sdz>-Z-RGASq&rY3%v!Ymz4jp!Q!WQjJqGL4a-Y;>7hV8)JfA7CV zj|U8R!#z*4!=Cdz*ZXGMcSHZ;XU6qkV!29-R}4RL93wBer(_@*NCuLD(`A5fw#xFt zG5cg78At}c7|{EnuqoES(b29Bc2)uq7c`qt*IGhjN?;8f9XUf04<&l2M2R6DPJ0Qz z8aO(7IK)=*_coAEj_G0dk>X>~pkPJ*2IQQX7-~U^FGP6bgG$cpKKr(P*49KF{ zG;1Cz-qv5o)3>&;J+i5&->3?O`s62o1HDJCY|`h8>h!CDqoZa~yM+_;N5BZlE*ba- G20j4lPbQcE literal 0 HcmV?d00001 diff --git a/FDFullscreenPopGesture/.DS_Store b/FDFullscreenPopGesture/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0*)viewControllers +{ + + if (![self.interactivePopGestureRecognizer.view.gestureRecognizers containsObject:self.fd_fullscreenPopGestureRecognizer]) + { + [self.view addGestureRecognizer:self.fd_fullscreenPopGestureRecognizer]; + + } + + NSArray *internalTargets = [self.interactivePopGestureRecognizer valueForKey:@"targets"]; + id internalTarget = [internalTargets.firstObject valueForKey:@"target"]; + SEL internalAction = NSSelectorFromString(@"handleNavigationTransition:"); + self.fd_fullscreenPopGestureRecognizer.delegate = self.fd_popGestureRecognizerDelegate; + [self.fd_fullscreenPopGestureRecognizer addTarget:internalTarget action:internalAction]; + + // Disable the onboard gesture recognizer. + self.interactivePopGestureRecognizer.enabled = NO; + + + //traverse childViewControllers + for (UIViewController *viewController in viewControllers) + { + if (!self.fd_viewControllerBasedNavigationBarAppearanceEnabled) + { + return; + } + + __weak typeof(self) weakSelf = self; + _FDViewControllerWillAppearInjectBlock block = ^(UIViewController *viewController, BOOL animated){ + __strong typeof(weakSelf) strongSelf = weakSelf; + if (strongSelf) + { + [strongSelf setNavigationBarHidden:viewController.fd_prefersNavigationBarHidden animated:animated]; + } + }; + + viewController.fd_willAppearInjectBlock = block; + } + + // Forward to primary implementation. + [self fd_setViewControllers:viewControllers]; +} + + + + + + + + + + + + + + + + + + + + - (void)fd_pushViewController:(UIViewController *)viewController animated:(BOOL)animated { if (![self.interactivePopGestureRecognizer.view.gestureRecognizers containsObject:self.fd_fullscreenPopGestureRecognizer]) {