Skip to content

Crash because unexpected nil  #23

Open

Description

@alexsteinerde

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

Activity

  1. LcTwisk commented on May 3, 2018

    @LcTwisk
    Owner

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

  2. alexsteinerde commented on Jun 10, 2018

    @alexsteinerde
    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.

  3. damouse commented on Feb 15, 2019

    @damouse

    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?

  4. alexsteinerde commented on Mar 8, 2019

    @alexsteinerde
    Author

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions