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

While closing the viewcontroller via dragging, calling floatPanelController's hide() will cause a crash. #216

Closed
1 of 3 tasks
cozzin opened this issue Jun 3, 2019 · 3 comments · Fixed by #220
Closed
1 of 3 tasks

Comments

@cozzin
Copy link

cozzin commented Jun 3, 2019

Short description

While closing the viewcontroller via dragging, calling floatPanelController's hide() will cause a crash.

Expected behavior

  1. Drag to close view
  2. Touch backdropview (call hide() method) while dragging to close view controller
  3. The hide () command is ignored because the screen is already closed

Actual behavior

  1. Drag to close view
  2. Touch backdropview (call hide() method) while dragging to close view controller
  3. Crash image

Steps to reproduce

  1. Add gesture for backdrop
  2. Close Panel using drag
  3. Touch backdrop view while the screen is closing

Code example that reproduces the issue

public final class ExampleViewController: FloatingPanelController {

    private lazy var backdropTapGesture = UITapGestureRecognizer(target: self, action: #selector(handleBackdrop(_:)))

    init() {
        super.init()
        backdropView.addGestureRecognizer(backdropTapGesture)
    }

    @objc func handleBackdrop(_ sender: UITapGestureRecognizer) {
        hide()
    }
}

Environment

Library version
1.5.1

Installation method

  • CocoaPods
  • Carthage
  • Git submodules

iOS version(s)
12.2

Xcode version
10.2.1

@scenee
Copy link
Owner

scenee commented Jun 7, 2019

Thanks, @cozzin! I will fix it.

@scenee
Copy link
Owner

scenee commented Jun 11, 2019

I fixed #220. Thanks again, @cozzin!

@cozzin
Copy link
Author

cozzin commented Jun 12, 2019

@scenee You're welcome. I am a big fan of this library. Thank you for your quick fix.

@scenee scenee mentioned this issue Jun 20, 2019
3 tasks
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

Successfully merging a pull request may close this issue.

2 participants