Skip to content

[iOS] - Enabled MultipleTouch Support for Handling Multi-Touch Points in GraphicsView #29895

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

Merged
merged 1 commit into from
Jun 13, 2025

Conversation

prakashKannanSf3972
Copy link
Contributor

@prakashKannanSf3972 prakashKannanSf3972 commented Jun 10, 2025

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause

On iOS, UIView has MultipleTouchEnabled set to false by default, which causes PlatformTouchGraphicsView to receive only a single touch point. As a result, multi-touch gestures like pinch and zoom do not function correctly.

Description of Change

Added multi-touch support to the iOS implementation of PlatformTouchGraphicsView by enabling the MultipleTouchEnabled property.

Documentation Reference:

  • As per Apple's documentation: This property defaults to false and must be explicitly set to true to receive multiple touches.

Issues Fixed

Fixes #29461

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Test Case

Note : Appium currently does not support multi-finger touch actions, which makes it technically infeasible to automate a test case for this scenario. Therefore, a test case could not be added to validate this fix through automated UI testing.

Output

Before After
MultiTouch_Before_Fix.mov
MultiTouch_After_Fix.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jun 10, 2025
Copy link
Contributor

Hey there @@prakashKannanSf3972! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jun 10, 2025
@sheiksyedm sheiksyedm added area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/ios labels Jun 10, 2025
@prakashKannanSf3972 prakashKannanSf3972 marked this pull request as ready for review June 10, 2025 14:03
@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 14:03
@prakashKannanSf3972 prakashKannanSf3972 requested a review from a team as a code owner June 10, 2025 14:03
Copilot

This comment was marked as outdated.

@sheiksyedm sheiksyedm requested a review from Copilot June 10, 2025 14:03
Copilot

This comment was marked as outdated.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables multi-touch support in the iOS implementation of PlatformTouchGraphicsView to resolve pinch and zoom issues.

  • Enabled the MultipleTouchEnabled property to allow multi-touch input on iOS.
  • The change directly addresses the Apple documentation requirement for multi-touch capabilities.

@@ -21,6 +21,7 @@ public PlatformTouchGraphicsView()
_proxy = new(this);
Opaque = false;
BackgroundColor = null;
Copy link
Preview

Copilot AI Jun 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change correctly enables multi-touch support on iOS as per Apple's documentation. Consider adding an inline comment referencing the documentation URL to improve code maintainability and clarity.

Suggested change
BackgroundColor = null;
BackgroundColor = null;
// Enable multi-touch support as per Apple's documentation:
// https://developer.apple.com/documentation/uikit/uiview/1622459-multipletouchenabled

Copilot uses AI. Check for mistakes.

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen PureWeen changed the base branch from main to inflight/current June 13, 2025 12:09
@PureWeen PureWeen merged commit c37d39d into dotnet:inflight/current Jun 13, 2025
76 of 78 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 16, 2025
PureWeen pushed a commit that referenced this pull request Jun 21, 2025
PureWeen pushed a commit that referenced this pull request Jun 25, 2025
PureWeen pushed a commit that referenced this pull request Jun 25, 2025
github-actions bot pushed a commit that referenced this pull request Jun 26, 2025
github-actions bot pushed a commit that referenced this pull request Jun 26, 2025
PureWeen pushed a commit that referenced this pull request Jun 27, 2025
github-actions bot pushed a commit that referenced this pull request Jun 27, 2025
PureWeen pushed a commit that referenced this pull request Jun 27, 2025
PureWeen added a commit that referenced this pull request Jun 28, 2025
For more information about inflight process check
https://github.com/dotnet/maui/wiki/Inflight-Branch-Process

# .NET MAUI Release Notes - Inflight/Candidate Branch

## What's Changed

### MAUI Product Fixes
* [iOS] CarouselView with CarouselViewHandler2 make app crash when
Loop="False" and user scroll to the last position - fixes #26863 by
@kubaflo in #26868
* Fixes Setting BackgroundColor to null does not actually changes
BackgroundColor - fixes #22914 and #19576 by @jgonzalez-gft in
#22917
* Fixed the picker title's color - fixes #16737 by @kubaflo in
#23075
* [android] Fallback to default icons in SearchHandler by @aheubusch in
#25067
* ScrollView's Background on iOS - fixes #24016 by @kubaflo in
#25541
* [iOS] Enabled MultiTouch Support for Handling Multi-Touch Points in
GraphicsView - fixes #29461 by @prakashKannanSf3972 in
#29895
* Optimize converters for GridLength, ColumnDefinition, and
RowDefinition - performance improvement by @emiller in
#20048
* Add defensive IsAlive check to Android ViewExtensions.OnUnloaded -
fixes #28051 by @jfversluis in #29934
* [Windows] Fixed runtime update issue for SearchBar PlaceholderColor
and BackgroundColor - fixes #29962 by @Tamilarasan-Paranthaman in
#29965
* Weak subscription to CanExecuteChange events - fixes #16124 by
@sneumaier in #29837
* [iOS, Mac] Fix for downsized image retaining original dimensions in
GraphicsView - fixes #30006 by @SyedAbdulAzeemSF4852 in
#30007
* [Android] Prevent Picker from Gaining Focus on Touch - fixes #19739,
#8546, #13503, #24862, #28121, #21704, #15394 by @bhavanesh2001 in
#29068
* Fix CV1 GridItemsLayout centering single item AND Fix Empty view not
resizing when bounds change - fixes #29595, #29634 by @albyrock87 in
#29639

### Testing
* [Testing] Feature Matrix UITest Cases for Button by @TamilarasanSF4853
in #29803
* [Testing] Feature matrix UITest Cases for BoxView Control by
@HarishKumarSF4517 in #29808
* [Testing] Enable HandlerDoesNotLeak for Button and ProgressBar by
@bhavanesh2001 in #29896
* [Testing] Add Validation Test For Issue28051 On Android by
@prakashKannanSf3972 in #30026
* [Testing] Fixed Test case failure in PR 30115 - [2025/06/23] Candidate
by @HarishKumarSF4517 in #30136

### Dependency Updates
* Bump to 1.7.250606001 of WindowsAppSDK by @sneumaier in
#29915

### Housekeeping
* [housekeeping] Update namespaces in HostApp and Shared tests projects
by @bhavanesh2001 in #29904
* Update SetterSpecificity.cs Remove Extra Line From Bad Merge by
@sneumaier in #29987
* Revert - Fixed the Label not sized correctly on Android by @Ahamed-Ali
in #30023
* Revert "Fixes Setting BackgroundColor to null does not actually
changes BackgroundColor #22914 (#22917)" by @mattleibow in
#30031
* [create-pull-request] automated change by @github-actions[bot] in
#30019
* [create-pull-request] automated change by @github-actions[bot] in
#30043
* [create-pull-request] automated change by @github-actions[bot] in
#30078
* Update Controls.TestCases.HostApp.csproj by @HarishKumarSF4517 in
#30124

## New Contributors
* @albyrock87 made their first contribution in
#29639
* @SyedAbdulAzeemSF4852 made their first contribution in
#30007
* @emiller made their first contribution in
#20048
* @jgonzalez-gft made their first contribution in
#22917
* @aheubusch made their first contribution in
#25067

**Full Changelog**:
https://github.com/dotnet/maui/compare/main..inflight/candidate
@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StartInteraction event on IOS does not support multitouch points
4 participants