Latest 2.0.2
License MIT
Platforms ios 7.0, requires ARC



Use CocoaPods

pod 'CJSidePopGesture', '~> 2.0.0'
pod 'CJSidePopGesture'



这个扩展来自 @forkingdog 团队这些人的源码,以及@J_雨等人,参考文章地址:(


AOP, just add 2 files and no need for any setups, all navigation controllers will be able to use fullscreen pop gesture automatically.

To disable this pop gesture of a navigation controller:

navigationController.fd_fullscreenPopGestureRecognizer.enabled = NO;

To disable this pop gesture of a view controller:

viewController.fd_interactivePopDisabled = YES;

Require at least iOS 7.0.

View Controller Based Navigation Bar Appearance

It handles navigation bar transition properly when using fullscreen gesture to push or pop a view controller:

  • with bar -> without bar
  • without bar -> with bar
  • without bar -> without bar

This opmiziation is enabled by default, from now on you don’t need to call UINavigationController‘s -setNavigationBarHidden:animated: method, instead, use view controller’s specific API to hide its bar:

- (void)viewDidLoad {
[super viewDidLoad];
self.fd_prefersNavigationBarHidden = NO;

And this property is NO by default.

View Controller With ScrollView

If you want to use fullscreen pop gesture in ViewController with scrollView or subclass of scrollView , you should customize the scrollView or subclass of scrollView and overload the gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer: method . like this:

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
if (self.contentOffset.x <= 0) {
if ([otherGestureRecognizer.delegate isKindOfClass:NSClassFromString(@"_FDFullscreenPopGestureRecognizerDelegate")]) {
return YES;
return NO;

Release Notes

1.0.1 – 解决对称性问题,从不隐藏到隐藏返回时候导航条黑掉的问题
1.0.0 – 侧滑返回首次上传修改,这个版本支持到iOS7.0以及以上.



Latest podspec

    "name": "CJSidePopGesture",
    "version": "2.0.2",
    "summary": "u4fa7u6ed1u8fd4u56de for iOS",
    "description": "u4feeu6539u4e86u767eu5ea6u77e5u9053u7684u4fa7u6ed1u8fd4u56de,u652fu6301iOS7.0",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "J.Cheng": "[email protected]"
    "platforms": {
        "ios": "7.0"
    "source": {
        "git": "",
        "tag": "2.0.2"
    "source_files": "CJSidePopGesture/*.{h,m}",
    "requires_arc": true

Pin It on Pinterest

Share This