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