-
Notifications
You must be signed in to change notification settings - Fork 395
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
MAUI iOS - DrawingView inside ScrollView does not draw. Attempted drawing trigger scrolling instead of drawing. (works fine on android) #1807
Comments
I have the same issue, when placing the DrawingView inside a CollectionView. |
…ter adding a Pin to the Map when IsShowingUser is set to True #1801 (#1817) Implementing Fix for Issue #1807. Modify Windows Map Pins Page sample show user. Updated MapHandler.Windows RemoveAllPins() to add back user location if showing user. Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
Same issue here on iOS. Also when placed inside a Modal page that scrolls when the user interacts with it. |
Possible solution might be this: https://github.com/xamarin/SignaturePad/blob/master/src/SignaturePad.iOS/InkPresenter.cs See line: 34
|
Other solution is to use SkiaSharp: dotnet/maui#18758 |
2 things:
|
On a lighter note... it has less cracks than MAUI :) and doing its testing job nicely. I will do something about phone once MAUI is stable and i can complete my migration hehe. Back to Problem: |
I don't agree that it would be a bad user experience. Having that explicit mode makes more sense to me. Imagine a user attempts to scroll and then accidentally signs in the box instead, if your app requires the user to sign you're opening up to accidental signatures which sounds bad. Anyway I don't disagree that we shouldn't try and fix something |
I solved this problem, by addding the <ContentView
...
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls">
<ContentView.Content>
<ScrollView ios:ScrollView.ShouldDelayContentTouches="false">
... more info here: https://learn.microsoft.com/en-us/dotnet/maui/ios/platform-specifics/scrollview-content-touches?view=net-maui-8.0 |
@zleao thank you for sharing that! I think we should add that detail to the documentation for the toolkit and that might be all we can do for now. |
Thanks @zleao ios:ScrollView.ShouldDelayContentTouches="false" works fine. |
I am going to close this issue now that the documentation covers the solution |
Maybe the ShouldDelayContentTouches works for a scrollview but i use the drawingpad in a tableview which has scroll capabilities. On iOS it still scrolls the tableview when to want draw a signature. When i put my finger at the drawingpad, wait for a couple milliseconds, then i can write the signature ( in one stroke, up and down, right and left) Second stroke i need to do the same, |
@mnidhk The |
@mnidhk |
Thnx for the info! Working great! |
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
When DrawingView is used inside scroll view, attempt to draw triggers scrolling on iOS and drawing does not work. this works fine on android.
I am trying to migrate Xamarin Forms app to MAUI and need to replace signature pad on the form with drawing view. this is a blocker for my migration.
Expected Behavior
DrawingView inside scroll view must work fine on iOS like android. Drawing must not trigger scrolling.
Steps To Reproduce
I have provided link to reproduction repository and video with demo app.
Steps: (problem only on iOS, android works fine)
Create Default MAUI App
Add community toolkit to use drawing view
Updated MauiProgram.cs and add .UseMauiCommunityToolkit() to builder.
Update main page xaml to have drawing view inside scroll view, make sure there is enough content before and after drawing view to have scroll bar on the page
try to draw on drawing view (vertically), page scrolls instead of drawing on drawing view.
MAUI.DrawingView.mp4
Link to public reproduction project repository
https://github.com/mahesh139/MAUIDrawingView
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: