indieSoftware / INSpriteKit

Sprite Kit extensions
MIT License
19 stars 5 forks source link

Queston on setting scrollContentNode position #1

Open Relequestual opened 5 years ago

Relequestual commented 5 years ago

In the INSKScrollNode touch event handler is the following line of code:

https://github.com/indieSoftware/INSpriteKit/blob/473d95a5cda3047ee03e94965681a02667b4e895/INSpriteKit/INSKScrollNode.m#L412

Why is self.scrollContentNode.position set rather than self.scrollContentPosition? What would the implications be if you did so?

I ask because I have ported this class (and supporting classes) to Swift 4, and I was having a huge probelm getting touch interactions to actually trigger change in movement, till I changed that line as above.

I expect I've missed something, and I might have follow up questions, but this is a good place to start. I want to understand what's going on here, which is difficult when I can just about read some Obj C.

Thanks in advance!

indieSoftware commented 5 years ago

Hi Ben, nice to see that someone wants to pick up my old lib!

I’m sorry, but the code is now 4 years old and I really can't remember such details. I have absolutely no clue if changing this would introduce any side effects or not. Especially because I didn't follow SpriteKit and therefore I don't know what have changed since then.

All I know is that SpriteKit's touch handling was really buggy and that was the reason I wrote this lib.

Well, if you've tried to change this line and it then solves a problem, then I think you are on a good way. ;-)