Closed CivelXu closed 3 years ago
Depending on how difficult this turns out to be (I haven't touched that part of the code in years), I might add a delegate method or a property to control this.
Implemented. Use popupInteractionStyle = .customizedSnap(percent: 0.6)
to control the percent of drag before the popup is closed.
I use the .drag interaction style in my app. But the gesture is very easy to touch by mistake to close the popup.I can show you a video.
That was the behavior of the popup in Apple's apps, before they switched to the snap behavior. I got it to behave very similarly. Basically, if you stop your gesture at the direction of dismiss, it dismisses. You can look at the internal logic for that. I haven't touched it in years because it was very close to Apple's behavior.
Now when you go to pull down a little bit, popup put it away。 I want to set a longer distance to reduce the agility of the drop-down popoup.