2番めのリンク先にある、Objective-Cのコードは、Swiftにこのように書き換えできます。 Objective-C -------- -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch *touch in touches) { [self.view.window.rootViewController performSegueWithIdentifier:@"presentSecond" sender:nil]; } } Swift --------- override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) { self.view.window?.rootViewController
![SpriteKitの中から別のViewControllerに切り替える方法(Swift)現在、Xcode6.3.1のSpr... - Yahoo!知恵袋](https://cdn-ak-scissors.b.st-hatena.com/image/square/1d07bee2b75b182ba712690f3a3464c29972e28b/height=288;version=1;width=512/https%3A%2F%2Fs.yimg.jp%2Fimages%2Fks%2Fclap%2Fimage%2Fogp%2Fogp.png)