// You will get notified by following protocol method.funcchildCollectionView(_collectionView: UICollectionView, parentCollectionViewIndex: Int) {
// When parent collection view's scroll stops, this will get called with new parent collectionview's index.// You can use this message to fetch related child collection view's new data.// Once you have the latest child collection view's data, set `childCollectionViewDataReady` to `true`.// NOTE: This is important to be set, otherwise your child collection view propably will not show up again.
chainView.childCollectionViewDataReady=true
}

Customization

Child Collection View Animation Type

For now ChainPageCollectionView support two types of child collection view transition animation.

ItemSize

You can use parentCollectionViewItemSize and childCollectionViewItemSize to set related layouts’ itemSize.

Screen Ratio

The default behaviour of this view is that parent collection view takes 3/4 height of this view and child collection view takes the rest. You can set viewType to a customized ratio with type customParentHeight(#SomeInt, #SomeInt)