Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override func viewDidLoad() {
- super.viewDidLoad()
- NotificationCenter.default.addObserver(self, selector: #selector(GameViewController.doaSegue), name: NSNotification.Name(rawValue: "doaSegue"), object: nil)
- //I kept out all of the code for setting up the scene
- }
- @objc func doaSegue(){
- performSegue(withIdentifier: "show", sender: self) //The error occurs on this line
- self.view.removeFromSuperview()
- self.view = nil
- }
- let Action1 = SKAction.fadeAlpha(to: 0.75, duration: 5)
- let Action2 = SKAction.run {
- print("segue")
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: "doaSegue"), object: nil)
- }
- shape.run(SKAction.sequence([Action1, Action2]))
- // let Action2 = SKAction.run {
- print("segue")
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: "doaSegue"), object: nil)
- // }
- // shape.run(SKAction.sequence([Action1, Action2]))
Add Comment
Please, Sign In to add comment