I rewrote the objective-C min application in swift and decided that viewing the collection works better than tableview in my case. So I have a collection that is configured exactly the way I want it, and now I need to add a footer to my collection view.
In objective-C, it was very easy for me, all I did was create a UIView, add objects to it and add it to my table, like this.
self.videoTable.tableFooterView = footerView;
Now I’m trying to get a similar solution in my view of the collection, but so far I’m out of luck.
Is there a simple .collectionviewFooterView or something that I can add to a UIView?
EDIT
I found similar ideas HERE if this helps create an answer
EDIT
I was thinking of ways to achieve this, so now I want to add a footer at the end of the collection view using the following code:
var collectionHeight = self.collectionView.collectionViewLayout.collectionViewContentSize().height
footerView.frame = CGRectMake(0, collectionHeight, screenSize.width, 76)
The only problem I encounter with this workaround is that I need to add more space to the contentView colletionView and I have no luck with this
My decision
I solved this using a workaround (not the prettiest one, but it works), I add a UIView to the uicollectionview with a simple
footerView.frame = CGRectMake(0, collectionHeight - 50, screenSize.width, 50)
self.collectionView.addSubview(footerView)
and set the layout inserts using this:
alLayout.contentInsets = UIEdgeInsetsMake(2, 2, 52, 2)