Closed deshan closed 5 years ago
Hi @deshan, I'm going to need more information:
deinit
method is called when the panel is dismissed?Sorry for the late reply.
Thank you and again many apologies!
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
}
@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.
Panel
Any help?
Below is my code, took latest from pods (2.0.3)