1

In Snapchat, you can swipe left or right and access an entirely different UIViewController, from the camera to tableviews.

It appears that all viewControllers are kept live and retained, so switching between them is smooth and doesn't require any kind of transition.

Does anyone know how this is achieved or can point me in the right direction? Thanks

user339946
  • 5,961
  • 9
  • 52
  • 97

2 Answers2

1

It's done with a custom container view controller. The container is most likely a scroll view with paging. See Creating Custom Container View Controllers.

Edit: You actually don't have to build a custom container view controller to do this for you. iOS already has UIPageViewController.

Espresso
  • 4,722
  • 1
  • 24
  • 33
0

You can achieve this by creating a UIPageViewController and put your UIViewControllers inside that.

Here is a great repo for this:

https://github.com/goktugyil/EZSwipeController

Esqarrouth
  • 38,543
  • 21
  • 161
  • 168