Git Product home page Git Product logo

Comments (4)

antoniocasero avatar antoniocasero commented on August 17, 2024

Hi @deshan, I'm going to need more information:

  • This panel performs dismiss operation but it appears again? or a new panel comes up?
  • Where the code above is executed? After pressing a button?
  • Could you check if the panel deinit method is called when the panel is dismissed?

from panels.

deshan avatar deshan commented on August 17, 2024

Sorry for the late reply.

  1. Yes I am creating a new panel. but dismiss animation shows, but prev panel stays
  2. Yes after button press
  3. deinit not get called. Memory grows.

Thank you and again many apologies!

from panels.

deshan avatar deshan commented on August 17, 2024

I think found the issue.

This would be needed.

self.panel?.removeFromParentViewController()
self.panel?.view.removeFromSuperview()

Ofc it's been called in
self.panel?.removeContainer()
But the second time it doesn't get called the reason is self.panel is nil

self.panel = nil moving inside the closure may fix the issue? haven't tried. I manually called them inside my code.

UIView.animate(withDuration: configuration.dismissAnimationDuration, animations: {
            panelView.frame.origin = CGPoint(x: 0, y: self.containerView!.frame.size.height)
        }) { _ in
            self.panel?.removeContainer()
            completion?()
            self.panel = nil // moving here may fix the issue
        }

from panels.

antoniocasero avatar antoniocasero commented on August 17, 2024

@deshan I have a question you said

Yes I am creating a new panel. but dismiss animation shows, but prev panel stays

how many panels are you presenting? If you create more than one, then you wouldn't have control over it and it will stay on the screen. You should dismiss the first panel before present the new one.

from panels.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.