1
votes

I have a UIScrollView into which a Pan gesture recognizer is attached and the property in the gesture recognizer, ShouldRecognizeSimultaneously is set to return true so that the Pan gesture and the scrolling in the UIScrollView work simultaneously.

At some point, the Pan gesture will set the ScrollEnabled property of the UIScrollView to false. Then the scroll is disabled.

Again at somepoint the Pan gesture will set the ScrollEnabled property of the UIScrollView to true (from false). But unfortunately the scrolling wouldn't trigger at that point (the property is setting to true correctly as seen in the Console) while the panning is continued (without releasing). But once released the panning in which the scroll was enabled, and try scrolling again, then the scrolling works afterwards.

Can someone help me out with this issue?

If the question is not clear enough please comment ????

1
Can you share the code you've tried to help us understand?ColeX - MSFT

1 Answers

0
votes

Rather than dynamically Enabling or Disabling the Scrolling functionality of the ScrollView, I succeeded to achieve what I needed by,

  • Set scrolling enabled
  • Clearing the ContentOffset of the ScrollView when the Scrolling function needed to be disabled.
  • Avoid clearing the ContentOffset of the ScrollView when the Scrolling function needed to be enabled.