[iOS] Platform specifics to control ScrollView content touch delay #563

Merged
merged 5 commits into from Mar 24, 2017

Conversation

Projects
None yet
5 participants
@adrianknight89
Contributor

adrianknight89 commented Nov 25, 2016

Description of Change

iOS ScrollView is by default delaying content touches, which means when a touch gesture begins, an implicit timer will trigger and ScrollView will decide, based on user action within the timer span, whether it should handle the touch or pass it to its content. The default option is useful when we swipe fast and expect that it's a scroll.

However, this seems to be problematic when ScrollView is wrapped in a detail of an MDP. When the content of the scroll view is a Slider and the user slides the track fast, the slider will not win the gesture from ScrollView which in turn opens the master panel of the MDP.

Bugs Fixed

API Changes

Added:

  • ShouldDelayContentTouches
  • Getters/Setters for ShouldDelayContentTouches

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense
@@ -171,7 +171,7 @@ protected override void Dispose(bool disposing)
if (_tapGesture != null)
{
- if (_clickOffView != null && _clickOffView.GestureRecognizers.Contains(_panGesture))
+ if (_clickOffView != null && _clickOffView.GestureRecognizers.Contains(_tapGesture))

This comment has been minimized.

@adrianknight89

adrianknight89 Nov 25, 2016

Contributor

This is not related to the PR; however, I noticed it when looking at MDP renderers. This looks like a potential memory leak. Let me know if it should go in a separate PR.

@adrianknight89

adrianknight89 Nov 25, 2016

Contributor

This is not related to the PR; however, I noticed it when looking at MDP renderers. This looks like a potential memory leak. Let me know if it should go in a separate PR.

This comment has been minimized.

@rmarinho

rmarinho Nov 29, 2016

Member

please in a new pr..

@rmarinho

rmarinho Nov 29, 2016

Member

please in a new pr..

@@ -171,7 +171,7 @@ protected override void Dispose(bool disposing)
if (_tapGesture != null)
{
- if (_clickOffView != null && _clickOffView.GestureRecognizers.Contains(_panGesture))
+ if (_clickOffView != null && _clickOffView.GestureRecognizers.Contains(_tapGesture))

This comment has been minimized.

@rmarinho

rmarinho Nov 29, 2016

Member

please in a new pr..

@rmarinho

rmarinho Nov 29, 2016

Member

please in a new pr..

@rmarinho rmarinho requested a review from jassmith Mar 22, 2017

@jassmith jassmith merged commit 27de335 into xamarin:master Mar 24, 2017

@samhouts samhouts added this to the 2.3.5 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment