Open AtulKrt94 opened 6 years ago
update this method:
func collectionView(_ collectionView: UICollectionView, transitionLayoutForOldLayout fromLayout: UICollectionViewLayout, newLayout toLayout: UICollectionViewLayout) -> UICollectionViewTransitionLayout { let customTransitionLayout = TransitionLayout(currentLayout: fromLayout, nextLayout: toLayout) return customTransitionLayout }
it worked for me.
update this method:
func collectionView(_ collectionView: UICollectionView, transitionLayoutForOldLayout fromLayout: UICollectionViewLayout, newLayout toLayout: UICollectionViewLayout) -> UICollectionViewTransitionLayout { let customTransitionLayout = TransitionLayout(currentLayout: fromLayout, nextLayout: toLayout) return customTransitionLayout }
it worked for me.
I tried this but, it didn't work.
Could not cast value of type 'UICollectionViewTransitionLayout' (0x10b5dbb08) to 'DisplaySwitcher.TransitionLayout' (0x1087e88f8).
In this function
open func startInteractiveTransition() { UIApplication.shared.beginIgnoringInteractionEvents() transitionLayout = collectionView.startInteractiveTransition(to: destinationLayout) { success, finish in if success && finish { self.collectionView.reloadData() UIApplication.shared.endIgnoringInteractionEvents() } } as! TransitionLayout transitionLayout.layoutState = layoutState createUpdaterAndStart() }