preferredInterfaceOrientationForPresentation 적용 안되는 오류

두구두구다 2022년 12월 19일 PM 09:13 48 0
두구두구다 Profile Image Level 4

view controller가 보여질 때 바로 landscape left 방향으로 보여지도록 하는 부분이 잘 되지 않아 질문 남깁니다.
동영상에서처럼
override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { return .landscapeLeft }

overide해서 방향 지정해줬고, 메소드는 full screen 상태에서 호출이 가능하기 때문에 presentation도 full screen으로 변경해줬습니다.
하지만 landscape left로 재생이 되지 않고 portrait로 되네요..
문서를 보면
When your view controller supports two or more orientations but the content appears best in one of those orientations, override this method and return the preferred orientation.
부분이 있는데 이 부분의 의미랑 연관이 있나요??

view controller가 둘 이상의 방향을 지원하지만 이러한 방향 중 하나에서 컨텐츠를 나타내고 싶을 떄라는 의미가
var supportedInterfaceOrientations: UIInterfaceOrientationMask 메소드를 override해서 orientation을 추가해줘야된다는 의미로 생각이 되서요.


댓글 쓰기
답변하기
마크다운이 처음이라면 [마크다운 설명서]를 확인해 보세요.