투케이2K

27. (ios/swift) 모바일 화면 세로 방향 고정 실시 - AppDelegate portrait 본문

IOS

27. (ios/swift) 모바일 화면 세로 방향 고정 실시 - AppDelegate portrait

투케이2K 2021. 10. 25. 08:05
반응형

[개발 환경 설정]

개발 툴 : XCODE

개발 언어 : SWIFT


[소스 코드]

    // MARK: [모바일 화면 세로 고정 : 함수 추가]
    func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
        print("")
        print("===============================")
        print("[AppDelegate >> supportedInterfaceOrientationsFor() : 모바일 화면 세로 고정]")
        print("===============================")
        print("")
           
        // [세로 방향 고정]
        return UIInterfaceOrientationMask.portrait
    }

[결과 출력]


 

반응형
Comments