Snapchat-like swipe navigation between views in Xcode 6 and Swift)

maxster256 picture maxster256 · Jul 11, 2014 · Viewed 34.8k times · Source

I've been trying to implement swipe navigation between View Controllers in my app using the Swipe Gesture Recognizer and embeded Navigation Controller, but it doesn't look even close to the Snapchat's nav.

What would be the most efficient and appropiate way to implement such functionality?

I'm quite a newbie to Swift and programming really, and I would appreciate every helpful comment.

Answer

lbrendanl picture lbrendanl · Jul 31, 2014

The short version is to use a container view controller with a scrollview inside the controller. You then create separate view controllers for each screen you want in the application, and make those view controllers' parent the container view controller.

A github repo with sample code can be found, here.