I want to implement page sliding as in iphone google+ application’s stream.
So i want to return to first page when we swipe last page. I tried this using UIPageControl but I can’t do this.
So please give me any idea.
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.
If you have tried pageControl I assume you have downloaded Apple’s example project of Page Control if you have not ==> http://developer.apple.com/library/ios/#samplecode/PageControl/Introduction/Intro.html
You are going to see this part of code to handle the page number and the next page. and loads prev current and next pages at once. Try implementing page calculating mechanism with a % operator to you total page number. Therefore as soon as you arrive last page your next calculation will give you 1. So the next page will be set to one as soon as you swipe.
EDIT:
By the way this only changes the page indicator, you should also load the page views according to this page calculation. Because they are not automatically binded to indicator.
You can see how powerful a mod operator is 🙂