xmhafiz / DynamicBottomSheetViewController

19 stars 4 forks source link

Broken layout with safe area #1

Open gerchicov-vg opened 1 month ago

gerchicov-vg commented 1 month ago

Just took a sheet from your example and tried to move it up-down multiple times. Now it overlaps safe area

Simulator Screenshot - iPhone X - 2024-07-25 at 15 36 23

gerchicov-vg commented 1 month ago

found out that it is because of handlePanGesture - you shouldn't use guard isDraggingDown else { return } because you skip event when user drags it up and finishes gesture. So code inside case .ended is not called and doesn't restore the view positions properly. Instead you could limit moving by specifying max value.