Reputation: 1034
I'm having a little issue with scrollview pagination.
My intention is to have 3 pages visible on screen and when I scroll right only on page is scrolled, following the example below, scrolling right will display page 2, 3 and 4 on screen:
However I don't know how to display mutiple pages at the same time, at the moment I have it like this:
Obviously like this is not what I want.
To achieve the desired functionality I tried making the scrollview's frame the size of the page I want (1/3 of the screen width) and setting the clipToBound to NO so the other pages are visible. This indeed shows 3 pages in the screen; however since the scrollview frame is only 1/3 of the screen I can only swipe in that area, I would like the swipe area to be the whole screen width.
Upvotes: 0
Views: 730
Reputation: 1034
My solution in the end was the following:
Upvotes: 0
Reputation: 8090
You're on the right path. Now you can try manipulating UIPanGestureRecognizer
of your scrollView, say, re-attaching it to scrollView's superview.
Alternatively, take a look at iCarousel, it can be perfectly customized to suit your needs.
Upvotes: 2