0
Swift 3を使用してゲームシーンをビューコントローラにリンクするにはどうすればよいですか?ビューコントローラへのゲームシーン
私はボタンを作成しましたが、touchesEnded関数で作成したリンクは機能しません。
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
let touch = touches.first
let touchLocation = touch!.location(in: self)
if buttonHome.contains(touchLocation) {
print("tapped!")
let home:UIViewController = FirstViewController()
self.view?.window?.rootViewController!.present(home, animated: true, completion: nil)
}
}
私は質問を更新しました。ゲームシーンをビューコントローラに送信する。 –
Aとは何ですか? – Pragma1
2つのView Controllerの間にあるかのようにちょうどリンク。しかし、私はシーンからコントローラを見るためのリンクが必要です。私はちょうどシーンの上にゲームを持って、私はメインメニュー(ビューコントローラ)に戻ってみたいです。 –