본문 바로가기
Swift 파헤치기

[Swift4] 잡지식 Device Orientation

by doflamingo 2018. 11. 8.

Orientation 고정



아이폰이나 아이패드로 앱을 만들때 세로 방향 혹은 가로 방향으로 고정시키고 싶을 때가 있다. 이걸 코드로 해결하려했지만 코드가 아이패드한테 먹히지 않는걸 알았다.

그러다가 발견한 방법인데

왼쪽에 프로젝트를 누르고 타겟에서 자신의 앱을 클릭한 후 general로 들어가면


Deployment Info 라는게 있다. 저기 device를 Universal에서 iPad 혹은 iPhone으로 바꾼후 Device Orientation에서 하고자 하는 방향을 선택하면 된다.

모든 방향을 원하면 전부 체크를 해주면 된다.

또한 중요한게 하나 있는데 배포를 할때


이 Requires full screen을 체크를 해주어야 에러 없이 itunesconnect에 업로드를 할 수가 있다. (저거 체크안해서 개고생함..ㅠ)



위의 체크 안해주면 발생하는 에러,,ㅠㅠ

ERROR ITMS-90474: "Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight' in bundle "bundle_Name"

댓글