Scene Change Error - How do I do it properly?

60 views Asked by At

I am just wondering why am I getting an error in this code? It says Extra argument 'size' in call.

   let transitionToPlayScene = SKTransition.revealWithDirection(SKTransitionDirection.Down,duration: 1.0)

   let nextScene = Menu4s(size: self.size)
   self.view!.presentScene(nextScene, transition: transitionToPlayScene)

Thanks So Much

1

There are 1 answers

0
GoZoner On

The class Menu4s does not include an initializer with an argument size.

  1> class Menu4s {}
  2> Menu4s(size: 10)
repl.swift:2:7: error: extra argument 'size' in call
Menu4s(size: 10)
      ^      ~~