A simple but highly customizable UICollectionViewLayout for UICollectionView -- Simple SwiftUI views that let you make page-view effects.
Bump minimum supported version to iOS 13.0 to fix archiving issue on Xcode
transparentAttributeWhenCellNotLoaded
to false by default and add a SwiftUI modifier for thatNSKeyValueObservation
on contentOffset
instead of CATransaction.setCompletionBlock
selection
not being updated if data gets reloadNew features:
ZPosition
can be handled via CALayer
or layout attribute or both, see CollectionViewPagingLayout.zPositionHandler
ViewAnimator
: You can set the animation duration or implement your custom animator.ScaleTransformViewOptions.Layout.coverFlow
SnapshotTransformView.canReuse(snapshot:)
You can define when the existing snapshots invalidate.Changes:
zIndex
will apply to the attribute and the CALayer, you can change it using CollectionViewPagingLayout.zPositionHandler
configureTapOnCollectionView
and didSelectItemAt
methods removed. You can use the built-in collectionview delegate instead!false
"invalidateLayout"
on "viewDidLayoutSubviews"
setCurrentPage(4)
. the delegate method only gets called for page 4. previously, it was 2,3 and 4ScaleTransformView.blurHost
renamed to ScaleTransformView.scaleBlurHost
StackTransformView.blurHost
renamed to StackTransformView.stackBlurHost
SnapshotTransformView.identifier
renamed to SnapshotTransformView.snapshotIdentifier
snapshotIdentifier
to consider contentOffset
of a possible scrollview inside a pageminTranslateRatios
and maxTranslateRatios
instead of minTranslates
and maxTranslates
for ScaleTransformView
, it helps us to use the library on different screen sizes without changing the options, translateRatio
is also works differently:translateX = progress * translates.x * targetView.width
translateY = progress * translates.y * targetView.height
translateZ = progress * translates.z * targetView.width
// same for min and max
func collectionViewPagingLayout(_ layout: CollectionViewPagingLayout, didSelectItemAt indexPath: IndexPath)
for using this func configureTapOnCollectionView(goToSelectedPage: Bool = false)
needs to be called after assigning layout to the collection view - will be added to the ReadMecurrentPage