Skip to content

Unable to Update iOS SwipeGesture Direction at Runtime #17010

@adamzucchi

Description

@adamzucchi

Description

I have a SwipeGesture setup with a Direction of 'Up' to start, and after the swipe triggered and the UI updates I change the SwipeGesture's Direction to 'Down,' however on iOS the only Direction that triggers the SwipeGesture is still 'Up.'

I have been able to repro this on a physical iOS device as well as the iOS simulator.

Changing the SwipeGesture Direction at runtime works as expected on Android.

swipe-gesture.mp4

Steps to Reproduce

  1. Create a new .NET MAUI app
  2. Add a Layout to the MainPage that has a SwipeGesture with a specified direction on it (Up) and wire up an event handler in the code behind
  3. Create a bool value to be used to store the 'state' of the layout being opened or closed
  4. In the event handler for the SwipeGesture check a 'state' property of whether or not the Layout mentioned in step 2 is 'open' or not, if it is not open animate the layout open, and then change the SwipeGesture Direction to 'Down', and do the opposite for the other state change
  5. Run this on iOS and notice that the 'Up' gesture works fine to open the layout, however changing the Direction to 'Down' to close the gesture does not work, you still have to swipe 'Up' to close the layout.

Note: I have tried this with changing/updating the property via a named Xaml item as well as through a bindable property and the issue was still seen.

Link to public reproduction project repository

https://github.com/adamzucchi/MauiSwipeGestureDirectionBug

Version with bug

7.0.92

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 16

Did you find any workaround?

None

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-gesturesGesture typespartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/ioss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions