본문 바로가기

IOS 개발

[iOS] struct UIInterfaceOrientationMask

UIInterfaceOrientationMask

struct UIInterfaceOrientationMask

 

 

요약

이 상수는 뷰 컨트롤러에서 지원되는 인터페이스 방향을 지정하기위한 마스크 비트입니다.

Summary

These constants are mask bits for specifying a view controller’s supported interface orientations.

 

 

Declaration

struct UIInterfaceOrientationMask

 

토론

iOS 8부터는 UIInterfaceOrientation 상수를 사용하거나 인터페이스 방향으로 앱을 작성하는 대신 UITraitCollection 및 UITraitEnvironment API를 사용하고 API에서 사용되는 크기 클래스 속성을 사용해야합니다.

이전 버전의 iOS에서는 supportedInterfaceOrientations (for :) 메소드에서 또는 앱의 뷰 컨트롤러에서 지원할 방향을 결정할 때 이러한 상수를 반환했습니다.

Discussion

Starting in iOS 8, you should employ the UITraitCollection and UITraitEnvironment APIs, and size class properties as used in those APIs, instead of using UIInterfaceOrientation constants or otherwise writing your app in terms of interface orientation.

In earlier versions of iOS, you returned these constants from the supportedInterfaceOrientations(for:) method or when determining which orientations to support in your app’s view controllers.

 

 

 

 

 

[참조 : Open in Developer Documentation]