New
SwiftUI Support
New features:
- Add SwiftUI support
ZPositioncan be handled viaCALayeror layout attribute or both, seeCollectionViewPagingLayout.zPositionHandlerViewAnimator: You can set the animation duration or implement your custom animator.- You can use the predefined layout options using an enum. for instance,
ScaleTransformViewOptions.Layout.coverFlow SnapshotTransformView.canReuse(snapshot:)You can define when the existing snapshots invalidate.
Changes:
- By default,
zIndexwill apply to the attribute and the CALayer, you can change it usingCollectionViewPagingLayout.zPositionHandler configureTapOnCollectionViewanddidSelectItemAtmethods removed. You can use the built-in collectionview delegate instead!- Fix a problem: a page blinks before the transform effects apply on it, to fix it the attributes have alpha=0 by default before the cell is loaded. You can change it by setting "transparentAttributeWhenCellNotLoaded" to
false - An bounds observer added for the collection view so, you don't need to call
"invalidateLayout"on"viewDidLayoutSubviews" - If you are on page 1 and call
setCurrentPage(4). the delegate method only gets called for page 4. previously, it was 2,3 and 4 ScaleTransformView.blurHostrenamed toScaleTransformView.scaleBlurHostStackTransformView.blurHostrenamed toStackTransformView.stackBlurHostSnapshotTransformView.identifierrenamed toSnapshotTransformView.snapshotIdentifier- Change default implementation of
snapshotIdentifierto considercontentOffsetof a possible scrollview inside a page