enum ScreenType: Int {
case LANDSCAPE = 1
case PORTRAIT = 2
var videoOrientation: UIInterfaceOrientation {
switch self {
case .LANDSCAPE:
return UIInterfaceOrientation.landscapeRight
case .PORTRAIT:
return UIInterfaceOrientation.portrait
}
}
}
'Swift > 문법' 카테고리의 다른 글
[SWIFT]UnsafeBufferPosinter "Initialization of 'UnsafeBufferPointer<Int>' results in a dangling buffer pointer" (0) | 2023.07.03 |
---|---|
[SWIFT]Hasher() 함수 - 분석해야되는 내용 (0) | 2023.07.03 |
[SWIFT]Array sorted / map (0) | 2023.06.27 |
[SWIFT]Safe Array 사용하기 (0) | 2023.06.27 |
[SWIFT]Json String 형식 Json -> String 파싱 (0) | 2023.06.27 |