I’ve seen apps that have views that you swipe and it just slides to the next one, and it moves according to how far you’ve swiped. Kind of like a film strip. Is there an easy way to do this?
Share
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.
You can use a UIScrollView to achieve precisely this effect. (Each “picture” in the film strip being a view that you add to the scroll view.)
Incidentally, the above linked class reference document also contains links to sample code – see the “Related sample code” section in the header.
UPDATE
Here’s some sample code to detect the “current” page. It’s been a while since I’ve used a UIScrollView (this is from an early “getting to know iOS” plaything I wrote), so this may not be the best solution.