the SoundControoler is the UIViewControlloer that I am currently at and i need to get the GameScene which is an Skcene.
Code:
import AVFoundation
import Foundation
import SpriteKit
import GameKit
import UIKit
import iAd
class SoundController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
I know how to go to the UIViewController(SoundBoardController) from the SKcene but can't figure out how to do it the other way around.Below is the code I used to go from the SKcene to the ViewController.
func GotoSoundBoard(){
var vc: UIViewController = UIViewController()
vc = self.view!.window!.rootViewController!
vc.performSegueWithIdentifier("SoundSegue", sender: vc)
}
Below is the SKcene i need to get to
import AVFoundation
import Foundation
import SpriteKit
import GameKit
import UIKit
class GameScene: SKScene {
override func didMoveToView(view: SKView) {
}
}