Make the bottom most card also visible in full length
Hi @gleue,
I want one more help again :)
Currently when you have many stacked cells, if you scroll down to the bottom, you can only see a part of the bottom most card.. if you try scrolling to the limit, you can see a part of it..
is it possible to see the last card in full? i hope you get my point..
This is what i intend for : I need to use scrollToItemAtIndexPath to point to a cell, according to the date of the cell.. but this is not possible if the cell i need to point to is somewhere in the bottom of the list of cells.
Did you try increasing the content size in TGLStackedLayout -collectionViewContentSize?
@gleue I too have this issue. I tried fixing per your suggestion but no luck. Do you have any other suggestions?
Code:
if let height = stackedLayout.collectionView?.contentSize.height {
stackedLayout.collectionView?.contentSize.height = height + 500.0
}
@gleue / @annathomasQB This actually fixed the issue for me and shows the bottom card in its correct "unexposed" size just like the rest of the cards. Although this won't show the bottom card in "exposed" (i.e. full) view per your original request.
edgesForExtendedLayout = UIRectEdge.None
Try setting property TGLStackedLayout -itemSize to something != CGSizeZero and add the following lines to method TGLStackedLayout -collectionViewContentSize just below the CGSize contentSize = ... definition instead of manipulating the collection view's content size directly:
if (self.itemSize.height > self.topReveal) {
contentSize.height += self.itemSize.height - self.topReveal;
}
This will show the last item in full size when stacked. If you want the same size for the exposed layout, just set TGLStackedViewController -exposedItemSize to the same value as above.
You may also want to set TGLStackedViewController -exposedPinningMode depending on your itemSize.