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 because unexpected nil #23

Open
alexsteinerde opened this issue Apr 27, 2018 · 4 comments
Open

Crash because unexpected nil #23

alexsteinerde opened this issue Apr 27, 2018 · 4 comments

Comments

@alexsteinerde
Copy link

Expected behavior

When dismissing the view I expect to hide the view.

Actual behavior

The app crashed because an unexpected nil in this line:
screen_shot_2018-04-27_at_07 18 36

Steps to reproduce the behavior

Everytime I want to dismiss the image with a gesture or with the X.

I hope you can help me fix this.
Thanks

@LcTwisk
Copy link
Owner

LcTwisk commented May 3, 2018

I can't reproduce the problem using the example app. Are there any additional steps I should take?

@alexsteinerde
Copy link
Author

Sorry for the late response. I use a table view and I believe that the cell gets removed from stack but the cell was the superview of the image view. So the parent view cannot be found anymore and so the nil appears.

@damouse
Copy link

damouse commented Feb 15, 2019

I'm having the same problem with a collection view, where the imageview is nested within a container whose superview is always nil during this check and fails.

    func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
        let containerView = transitionContext.containerView
        let toView = transitionContext.view(forKey: UITransitionContextViewKey.to)!
        let fromParentView = fromImageView.superview!

The linked PR fixes the probem. Any reason it hasn't been merged? Is the author gone?

@alexsteinerde
Copy link
Author

alexsteinerde commented Mar 8, 2019

@ItsNotEasyBeingGreen could you please check my pull request?

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

3 participants