我在GameViewController类中创建了一个UIScrollView,其中Subviews是场景。当用户进入特定场景并按下特定按钮时,ScrollView必须停止滚动 我怎样才能做到这一点?
代码示例:
import SpriteKit
class GameViewController: UIViewController {
@IBOutlet weak var scrollView: UIScrollView!
...
}
class GameScene: SKScene {
//Here we have button and if we will push it
//then scrollView.scrollEnabled must be false in class GameViewController.