Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Snapchat-like multiple UIViewController

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?

3 Answers

you could probably use a UIPageViewController to do this or a scroll view with paging enabled.SwipeView also seems like a nice implementation. see this stack overflow post for some other options and some implementation methods.

Awesome! If i use parse.com with a PFtableView in one of the controller how would it be managed in such case? Will it be load once the page is swiped or at the loading of the parent container?

I don't have Snapchat installed on my phone but it really sounds like they are using a Page View Controller, load the different views as pages and probably hide the pagination dots.