The new version (> 6.0) of the Facebook app is probably one of the best non-Apple’s app in the store nowadays.
Every day, I look forward to the next update to see what they’ve added and to understand how they’ve done it.
In one of the latest updates, the hacker @chpwn added this awesome feature:
@aaronash you should try the swipe back gesture I did for the latest Facebook update
— Grant Paul (chpwn) (@chpwn) 13 maggio 2013
Basically a kind of hack of UINavigationController
to slide to the previous view controller in the navigation stack.
And the response was quite good:
Dynamic swipe back behaviour in UINavigationControllers (like Flurry and the new Facebook app update) need to be a thing. They're awesome.
— Adam Bell (@b3ll) 14 maggio 2013
So, why shouldn’t I try to create something similar for my own apps?
Taking advantage of few spare hours in a sunny Sunday of May, here you are:
Go and get it from GitHub :)