Today we'll look at a fun and interesting library that can help improve how users navigate around in our apps.
It works by augmenting UINavigationController's traditional interactions to add a gesture to view each of the view controller's that have been pushed on to it. We can use it just like a regular navigation controller:
let vc = SpaceshipsViewController() let nc = SAHistoryNavigationViewController(rootViewController: vc) presentViewController(nc, animated: true, completion: nil)
The library will handle showing the history scroll view when the user long presses the back button. If the user's device supports 3D Touch, the history scroll view activate with that gesture instead.
We can also trigger the history view to be shown at anytime like this:
We can customize the background color shown behind all the “zoomed out” view controller easily:
We can also customize the background view by subclassing, and overriding the
More info about SAHistoryNavigationViewController can be found at git.io/historync