1
我在類GameViewController中創建了一個UIScrollView,其中Subviews是場景。當用戶進入特定場景並按下特定按鈕時,ScrollView必須停止滾動。
我該怎麼做?代碼更改GameViewController(SpriteKit Swift)中變量的值
例子:
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.