A
A
Andrey Shilov2015-05-20 20:35:51
Objective-C
Andrey Shilov, 2015-05-20 20:35:51

How to use UICollectionView with other elements?

Good afternoon, I apologize in advance for the noob question, but I honestly searched for the answer myself, it does not work.
It is necessary to make an application for the site ttlip.ru
Now there is a problem with the fact that the banner inserted in front of the UICollectionView appears to be transparent.
But I need it to just show at the top, hide when scrolling.
How to do it?
There is an option - to do it using the header, but I'm not sure that this method is correct, because there may be complex elements.
c6df7064943b44628f034364d392e18b.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
An, 2015-05-21
@Flanker_4

You need to use your banner as a SupplementaryElement
The dataSource method is responsible for this
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
This will be the most correct solution
If you need some kind of complex animation - then work with uiscrollview will already be needed, but this is not even discussed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question