V
V
V2014-11-19 12:30:48
Objective-C
V, 2014-11-19 12:30:48

How to create a collection of scrolling cards in iOS?

Good afternoon. I wanted to know how to create a collection of cards so that they can be scrolled? Interested in the implementation of the cards and the scrolling process.
I want to do something like this: https://www.dropbox.com/s/yj7tz9qgliwsbiv/xyxqoddn...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lostuser, 2014-11-21
@lostuser

Good afternoon.
I did this with a regular UIScrollView. It has a pagingEnabled property and can scroll vertically. To see the edges of neighboring cards, you will have to tinker, but nothing complicated.

I
ifau, 2014-11-19
@ifau

UICollectionView

collectionView.collectionViewLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;

- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
{
    return 1;
}

Cards are filled from the prototype, in the method
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    ...
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question