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.
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
// Switch the indicator when more than 50% of the previous/next page is visible
CGFloat pageWidth = scrollView.frame.size.width;
int page = floor((scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
pageControl.currentPage = page;
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 :)