Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash #40

Open
AtulKrt94 opened this issue Jul 24, 2018 · 2 comments
Open

Crash #40

AtulKrt94 opened this issue Jul 24, 2018 · 2 comments

Comments

@AtulKrt94
Copy link

AtulKrt94 commented Jul 24, 2018

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()
}

@aditee94
Copy link

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.

@AtulKrt94
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants