It will go and Swift 2 and SpriteKit.
In the GameViewController class, I created a UIScrollView in which the slides are scenes (SKScene). That is, when a user opens a game, there is a ScrollView with rewinding scenes in front of it.
In one of these scenes, there is a button, when you click on it, the slider should stop spinning, no matter how we touch it (property scrollView.scrollEnabled = false).
How do I implement this?

I will explain the problem in more detail: in the main GameViewController class, there is a variable called ScrollView (such as UIScrollView). In a completely different class, we understand that the button is pressed and we need to change the property of the variable ScrollView.

  • I would say very strange that the controller does not know what is happening with its view. Options as usual: Notification, Singleton - Max Mikheyenko
  • And yet I did not understand how I could solve the problem. - Mistin
  • To solve the problem, you need to rewrite the application using MVC. to get around the problem, for example, use NSNotificationCenter to send a notification from your twist to the controller. - Max Mikheyenko

0