1️⃣ 하게 된 배경
밀크가이드 앱을 재보수 차 기기별 오토레이아웃을 알맞게 설정하려 했었는데, 이 과정 속에서 밀크가이드는 가로모드는 필요하지 않겠다는 생각이 들어 iOS 디바이스 방향을 세로모드로만 고정하고자 하여 찾고자 하였다!
2️⃣ 해결 방법
Appdelegate에서 *supportedInterfaceOrientationsFor* 메소드 이용하기!
- UIInterfaceOrientationMask를 portrait로 설정하면 끄읕~
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
// 세로방향 고정
return UIInterfaceOrientationMask.portrait
}