Skip to content

Releases: devxoul/SwipeBack

1.1.1

21 Oct 19:28
Compare
Choose a tag to compare
  • Fix SwipeBack when pushed with 3D touch (#13, @wolfcon)

1.1.0

27 Jul 14:48
Compare
Choose a tag to compare
  • Drop JRSwizzle dependency. (#6)

1.0.6

19 May 15:47
Compare
Choose a tag to compare
  • Fix a bug that app freezes when attempt to swipe back on non-swipe-backable view controllers.

1.0.5

18 May 05:59
Compare
Choose a tag to compare
  • Disable gesture recognizer for root view controller. (Thanks to @gotokatsuya!)

1.0.4

14 Jan 16:22
Compare
Choose a tag to compare
Bump version to 1.0.4

1.0.3

14 Jan 16:22
Compare
Choose a tag to compare
Bump version to 1.0.3

1.0.2

14 Jan 16:22
Compare
Choose a tag to compare
Bump version to 1.0.2

SwipeBack 1.0.1

17 Sep 12:05
Compare
Choose a tag to compare

Change Log

  • Add swipeBackEnabled property to UINavigationController.

SwipeBack 1.0.0

26 Aug 19:05
Compare
Choose a tag to compare

SwipeBack

Re-enable iOS7 swipe-to-back with custom back button.

Background

  1. With setting custom back button via leftBarButtonItem, default swipe-to-back gesture is disabled.

  2. Assigning interactivePopGestureRecognizer as UINavigationController (a common solution) can cause unexpected errors:

    • nested pop animation can result in corrupted navigation bar
    • Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
  3. Put custom code everywhere around UINavigationController is too annoying.

The Answer is SwipeBack

  1. Not annoying
    You don't need to code.
  2. iOS7 native behavior
    Not a foolishly-customized gesture recognizer.
  3. Safe
    No error anymore.

Use SwipeBack

CocoaPods

Just add a line below into your Podfile. You don't need to write any code. CocoaPods automatically import SwipeBack globally.

pod 'SwipeBack'

Without CocoaPods (Why not use?)

Import SwipeBack at your .pch file.

#import "SwipeBack.h"

It's done.

How does it work

See UINavigationController+SwipeBack.m and UIViewController+SwipeBack.m. Want to know more about method swizzling, visit here.