Skip to content

HuiiChong/CHNavigationController

Repository files navigation

This provides an fullScreen pop and push gesture for UINavigationController.

Features

  • FullScreen pop gesture support
  • FullScreen push gesture support
  • Customize UINavigationBar for each single viewController support
  • Customize pop and push gesture distance on the left side of the screen support
  • Close pop gesture for single viewController support
  • Show alert when pop viewController support

How To Use

Initialize

Objective-C:

#import "CHNavigationController.h"

CHNavigationController *nav = [[CHNavigationController alloc] initWithRootViewController:YourVc];

PushViewController

Objective-C:

[self.navigationController pushViewController:YourVc animated:YES];

Add push gesture connect viewController

Objective-C:

// Become the delegate of CHNavigationControllerDelegate protocol and, implemented protocol method, then you own left-slip to push function.
self.ch_navigationController.nav_delegate = self;

// Implementation protocol method
-(void)didLeftPush{
    [self.navigationController pushViewController:YourVc animated:YES];
}

show alert when you pop viewController

Objective-C:

self.ch_gestureEnabled = NO;

- (BOOL)didPopClick{
    //alert code
    return NO;
}

Close pop gesture for single viewController

Objective-C:

self.ch_gestureEnabled = NO;

About

This provides an fullScreen pop and push gesture for UINavigationController.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published