iOS: How do I swipe between views using Swift

LilK3ks picture LilK3ks · Sep 25, 2014 · Viewed 18.3k times · Source

I'm new to Swift and iOS development, and am looking how to set up a main view where I want swipe right for a second view or left for a third view. When I am in the second or the third view it should be possible to swipe back to the main view.

I found several ideas how to realize swipe view like this one: https://medium.com/swift-programming/ios-swipe-view-with-swift-44fa83a2e078

But the "problem" is, that I want to start on a main view with the possibility to swipe in both directions. (so with the solution above to start on the second view)

Does anyone know how to do this?

Answer

Fattie picture Fattie · Sep 25, 2014