-
-
Notifications
You must be signed in to change notification settings - Fork 514
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
Strange scrolling behavior - all content of the FloatingPanel is scrolling #633
Comments
Thank you for your report and comment :) I'll check this with the attached source code. |
Hi ! Thank you very much for the reply 🥹 |
…633) `pre > .zero` condition is not working for `FloatingPanelLayoutAnchor` with zero or minus `absoluteInset`. In fact, the condition is not needed here.
…633) `pre > .zero` condition is not working for `FloatingPanelLayoutAnchor` with zero or minus `absoluteInset`. In fact, the condition is not needed here.
…633) `pre > .zero` condition is not working for `FloatingPanelLayoutAnchor` with zero or minus `absoluteInset`. In fact, the condition is not needed here.
…633) `pre > .zero` condition is not working for `FloatingPanelLayoutAnchor` with zero or minus `absoluteInset`. In fact, the condition is not needed here.
…633) `pre > .zero` condition is not working for `FloatingPanelLayoutAnchor` with zero or minus `absoluteInset`. In fact, the condition is not needed here.
…633) Removed the `pre > .zero` condition from `FloatingPanelLayoutAnchor` as it was not appropriate for zero or negative `absoluteInset` values. Added documentation for `shouldScrollingContentInMoving(from:to:)` to prevent similar mistakes in the future.
@JelliedFish Additionally, I found the problem in TestFloatingPanel is that the animation around .tip state is choppy. I’ve also encountered this same issue before, but it was not on the library side. This can be fixed with the following patch to change the AutoLayout priority. Thanks. diff --git a/TestFloatingPanel/PanelContentViewController.swift b/TestFloatingPanel/PanelContentViewController.swift
index b218448..ec56cf4 100644
--- a/TestFloatingPanel/PanelContentViewController.swift
+++ b/TestFloatingPanel/PanelContentViewController.swift
@@ -73,8 +73,9 @@ class PanelContentViewController: UIViewController {
stackView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
])
- headerLabel.heightAnchor.constraint(equalToConstant: 60).isActive = true
-
+ let const = headerLabel.heightAnchor.constraint(equalToConstant: 60)
+ const.priority = .defaultLow
+ const.isActive = true
}
} |
@scenee Note Also thank u very much for helping with the "animation around .tip state" ❤️ I wanted to close the bug, but decided to wait for the updated version to be tested ⏳ However, over time, I noticed a new bug, bro ℹ️ Expected behavior
|
OK (v2.8.5) | Not OK (v2.8.5) |
---|---|
|
🧰 Environment
🔢 Library version
2.8.5
⛏️ Installation methods
- Swift Package Manager
Note
Also checked when adding locally
📱 iOS version(s)
- iOS
15.0-17.4
💻 Xcode version(s)
- Xcode
15.2-15.4
Thank you for your patience. I'll take a look for the new issue later. |
I've created a patch, #652 for the 2nd issue. |
…ost expanded state (#652) I decided to disallow interrupting panel interactions while bouncing over the most expanded state in order to fix the 2nd issue in #633, #633 (comment).
Introduction
First of all, thank you for your library - it's a huge work that deserves respect 💪🏻
I will be glad if you help me figure out the problem ❤️
📓 Description
During the migration from v1.x to v2.8.2 I've found a strange behavior.
When I scroll through the
tableView
, which is in theFloatingPanel
's content VC, the elements not related to thetableView
are scrolled too and its animation differs from the contents of thetableView
.Note
An interesting thing: if you set the
absoluteInset
to not to unequal tozero
, then everything works fine.Note
If you scroll the FloatingPanel when the
move
animation has not ended, then the same behavior. But even it breaks the solution withabsoluteInset > 0
.ℹ️ Expected behavior
🧑🏻💻 Steps to reproduce
I've created the simple app for testing, which includes:
RootViewController
.Code of the RootViewController
EmbeddedViewController
which stored in theRootViewController
and have all constraints as zero tosafeArea
.It also stores the
FloatingPanelController
.Code of the EmbeddedViewController
MyFloatingPanelController
which implements theFloatingPanelController
. With basic realization.Code of the MyFloatingPanelController
PanelContentViewController
with basictableView
andheader
arranged byStackView
.Code of the PanelContentViewController
🧑🏻💻 Source code
You can test this app manually:
With version 2.8.2
TestFloatingPanel.zip
With version 1.7.6
TestFloatingPanel.zip
❓How do you display panel(s)?
❓ How many panels do you displays?
Screenshots
🧰 Environment
🔢 Library version
⛏️ Installation methods
Note
Also checked when adding locally
📱 iOS version(s)
15.0-17.4
💻 Xcode version(s)
15.2-15.3
The text was updated successfully, but these errors were encountered: