the49ltd / The49.Maui.BottomSheet

.NET MAUI library used to display pages as Bottom Sheets
MIT License
318 stars 30 forks source link

iOS Remove/Limit gesture recognizers on bottom sheet? #120

Open nk-alex opened 3 months ago

nk-alex commented 3 months ago

I'm using BottomSheet with ContentDetent in iOS. I just have a DrawingView inside the bottom sheet. I'm unable to use it because any interactions with the DrawingView makes BottomSheet move up&down.

Is it possible to limit the dismiss action just to bottomsheet itself and remove it from elements on it? In android works as expected. If I set IsCancelable = "False", I cannot dismiss the bottom sheet but it still moves up&down which makes it unusable with DrawingView in iOS

Here a sample of the issue

https://github.com/the49ltd/The49.Maui.BottomSheet/assets/101177816/28104f5b-0ad2-40a9-aafb-fb1e1319d81a

Any possible workaround?

vhugogarcia commented 2 months ago

Have you tried to use the FullscreenDetent for iOS only, it appears for iOS it is the way to go for drawing view. However, I may be wrong. I don't think this is an issue of the plugin at all, but just by design on iOS: https://developer.apple.com/documentation/uikit/uisheetpresentationcontroller/3858107-largestundimmeddetentidentifier

nk-alex commented 1 month ago

@vhugogarcia Just saw this at Maui docs:

When using the DrawingView inside a ScrollView the touch interaction with the ScrollView can sometimes be intercepted on iOS. This can be prevented by setting the ShouldDelayContentTouches property to false on iOS as per the following example:

I solved this problem, by addding the ios:ScrollView.ShouldDelayContentTouches="false" to the ScrollView that contains the DrawingView

So I guess this is the problem in my scenario.