I want to make a carousel which only covers part of the page. I also want it to start over from the beginning when it reaches the end.
Asked
Active
Viewed 2,810 times
0
-
If you haven't seen this, this may be of some help: https://www.cocoacontrols.com/controls/icarousel – rymagno Aug 01 '14 at 20:28
1 Answers
3
It is relatively easy. You just need to set content offset back to the beginning when you reach the end of the content. It will be transparent for the user and look like endless scroll view.
How to
- Let's say you have a scroll view with fixed content width.
- You set the content offset to somewhere in the middle (starting position).
- You have to check in
scrollViewDidScroll:
method if you should adjust the content offset to mimic endless scrolling.
Look into this question for implementation details:

Community
- 1
- 1

Rafał Sroka
- 39,540
- 23
- 113
- 143