0
みんな。私はSpriteKitでXcode 9と4を使ってアプリを作っています。私はゲームを風景モードにします。SpriteKit横向きが動作しない
私は、プロジェクトの設定でランドスケープのみを許可し、このコードをアプリケーションデリゲートファイルに追加しようとしました。
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
//make device portrait unless it is the game view controller
if self.window?.rootViewController?.presentedViewController is GameViewController {
return UIInterfaceOrientationMask.landscape;
} else {
return UIInterfaceOrientationMask.portrait;
}
}
しかし、どちらも動作していないSpriteKitシーンは、まだポートレートで読み込まれています。風景を風景にするにはどうしたらいいですか?
これはゲームのシーンがまだ肖像画に読み込まれていません –
は、肖像画で読み込まれたシーンまたはあなたのシーンサイズの肖像画ですが、奇妙なスケール – Knight0fDragon