I am new to programming and am developing an iOS game. I have used only one view controller, which initializes the home SKScene and isn't used at all after that, and have around 6 SKScenes that can navigate between each other with the following code (in their respective scenes)
SKScene *storeScene = [[SKSceneStore alloc] initWithSize:self.size];
SKTransition *reveal = [SKTransition fadeWithDuration:0.5];
[self.view presentScene:storeScene transition:reveal];
One of my scenes is a store, and I would like to use scroll-kit (basically customizing code I found here ) to scroll through objects on my store.
In the github link above, which implements sprite-kit with UIScrollView, I have tried to move the UIScrollView code to the store SKScene but the
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
doesn't get called in sprite-kit scene. (I am trying to combine these into the store SKScene because my SKScenes have nothing to do with my view controller, and I feel like it would be messy keeping track of the SKScene and whether or not the UIScrollView exists in the View Controller).
So my question: How can I get
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
to fire off if it is in SKScene rather than UIViewController?