Reputation: 8714
I am trying to create list with items (similar to slider) that I can swipe left / right. I want to do it in swift.
It should look similar to this:
Can someone advice how should I start or is there some component that allows this?
Upvotes: 0
Views: 245
Reputation: 19662
Please take a look at UICollectionView
, you should be able to configure the scroll mode to 'horizontal' and adjust the cell size to what you have pictured (height should equal your screen height, and width be slightly smaller than the screen width).
You will need to implement the UICollectionViewDataSource
on your view controller to provide the content, and the UICollectionViewDelegate
to respond to the user scrolling to a new item, so you can animate or adjust the size of the image.
Upvotes: 1