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

When insetFor full is set to a negative value, the grab animation is broken. #349

Closed
kohemon opened this issue May 13, 2020 · 6 comments · Fixed by #352
Closed

When insetFor full is set to a negative value, the grab animation is broken. #349

kohemon opened this issue May 13, 2020 · 6 comments · Fixed by #352

Comments

@kohemon
Copy link

kohemon commented May 13, 2020

Description

I want to set the FloatingPanel to off-screen.
If I set insetFor's full to negative, the grab-and-lower animation will be broken.
Do you have a solution?

Code example that reproduces the issue

func insetFor(position: FloatingPanelPosition) -> CGFloat? {
        switch position {
        case .full: return -200
        case .half: return 262.0
        case .tip: return 69.0
        case .hidden: return nil
        }
    }

How do you display panel(s)?

  • Present modally

How many panels do you displays?

  • 1

Environment

Library version
Latest
Installation method

  • CocoaPods

iOS version(s)
11.4.1

Xcode version
11.4

I attach the URL of the video.
https://imgur.com/a/XU2qZYk

@scenee
Copy link
Owner

scenee commented May 16, 2020

Thank you for your bug report. I confirmed it and then I created PR #352 to fix this issue. I'm happy for you to double-check it to fix this issue.

@kohemon
Copy link
Author

kohemon commented May 20, 2020

It's confirmed!
Thanks for the great library!

@scenee
Copy link
Owner

scenee commented May 21, 2020

Thank you for your confirmation!

@rryan2
Copy link

rryan2 commented Nov 18, 2020

when I set the inset to a negative value, the floating panel does not work like when that is a positive value. I tried to continue scrolling from bottom to top without lifting my finger, and my tracking scrollview was moving with my finger(also scrolling). After I lift my finger, the tracking scrollview bounces back to the correct position. Is there a way to fix this?

@scenee
Copy link
Owner

scenee commented Nov 19, 2020

@rryan2 I need more information to grasp your problem because the lib's working well when I try a layout including a negative inset as described in this issue's description. I would like you to create a new issue and fill in details following the template.

@warpling
Copy link
Sponsor Contributor

warpling commented Dec 7, 2020

@kohei1218 perhaps it would be more native if you set your top anchor to 0 so it doesn't extend off screen and allow the library to manage the UITableView's scrolling behavior to allow users to scroll through this oversized content? If you're having trouble getting UITableView to expand to fit it's contents I recommend trying to give it an intrinsic content size.

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.

4 participants