Swift/문법
[SWIFT]enum StreenType (화면 회전 정보)
삽질중
2023. 6. 27. 13:43
enum ScreenType: Int {
case LANDSCAPE = 1
case PORTRAIT = 2
var videoOrientation: UIInterfaceOrientation {
switch self {
case .LANDSCAPE:
return UIInterfaceOrientation.landscapeRight
case .PORTRAIT:
return UIInterfaceOrientation.portrait
}
}
}