Latest 0.0.1
License MIT
Platforms ios 4.3, requires ARC

Subclass of UINavigationController to add swipe right to go back gesture recognizer like most apps (Facebook, Tweetbot) already do.

Just a couple of lines of code that are gonna improve the user experience of every app (especially for iPhone 5 users!).

Get it ready

Add it with CocoaPods

pod 'MSNavigationSwipeController'

and use MSNavigationSwipeController as your navigation controller.

How it works

- (void)addSwipeGestureRecognizer
  UISwipeGestureRecognizer *swipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRecognized:)];
  [self.view addGestureRecognizer:swipeGestureRecognizer];

- (void)swipeRecognized:(UISwipeGestureRecognizer *)gestureRecognizer
  if (gestureRecognizer.state == UIGestureRecognizerStateEnded &&
    gestureRecognizer.direction & UISwipeGestureRecognizerDirectionRight) {
    [self popViewControllerAnimated:YES];

That’s it, really!

You can also temporarily disable it with the property canSwipeRightToGoBack.


Freely inspired by Facebook, Tweetbot and many other apps.


Marco Sero


MSNavigationSwipeController is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "MSNavigationSwipeController",
    "version": "0.0.1",
    "summary": "Subclass of UINavigationController to add 'swipe right to go back' gesture recognizer like most apps (Facebook, Tweetbot) already do.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Marco Sero": "[email protected]"
    "source": {
        "git": "",
        "commit": "6f75fc3ad8018ec19c038e56d6346fa045d2dee3"
    "platforms": {
        "ios": "4.3"
    "source_files": [
    "requires_arc": true

Pin It on Pinterest

Share This