I’m trying to make a swipe navigation but i block on one point..
I must to create several views with one viewcontroller that controls them for swiping ?
Or I must to create one view with one viewcontroller each time ?
Thx you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depends.
1, You can either have multiple viewControllers embedded in a single UINavigationController and use a UISwipeGestureRecognizer and a Segue on every viewController to travel between them hierarchically….
2, … or you could use one single viewController with multiple UIViews and a UIPageControl (like in the default Weather app). You can find examples here and here.
The second option will give you smoother scrolling experience, but for showing entire different viewControllers i think you have to use the firsts option.
There is also the matter of transferring data between the views/viewControllers. In the first option you should use Segues and delegate protocols to transfer data between viewControllers.