0

I'm trying to add a UIScrollView in SpriteKit and I have got it work except for one thing. I'm apparently supposed to add the ScollView's gesture recognizer to my gesture recognizers collection, but I'm not sure what this means. I'm looking at the answer to the question here:

What is the right way to create scrollable table in SKSpriteKit?

In the answer:

  1. In the scene's didMoveToView: method, set up a UIScrollView instance. Set all the properties you need, and make sure to also set its delegate, set hidden=YES and add its panGestureREcognizer to the view gesture recognizer collection.

I'm not sure what it means to add the scrollers panGestureRecognizer to the collection. Does anyone know what this means and how to do it?

I want to be able to set the scrollers .hidden property to true but steal the scrollers content offset.

Thanks in advance!

Community
  • 1
  • 1
jwade502
  • 898
  • 1
  • 9
  • 22

1 Answers1

1

It just means this:

view.addGestureRecognizer(scrollView.panGestureRecognizer)
Aaron Brager
  • 65,323
  • 19
  • 161
  • 287