Is it possible to restrict scrolling within a UICollectionView to a subset of the items in the collection?
I have a UICollectionView that displays one item at a time. Each item takes the full width of the screen. The user can scroll horizontally between items.
At times I want to be able to restrict the user to scrolling between a subset of items based on certain conditions.
For example, view may contain items 1 through 20, but I only want the user to be able to scroll between items 7 and 9.
I have tried changing the contentSize to just the width necessary to display the desired items, then changing the contentOffset, but this does not work.