현재 기기의 화면 크기 받아오는 방법

Posted on 2021-11-22 by GKSRUDTN99
Swift&Xcode Swift

현재 기기의 화면 크기 받아오는 방법

현재 기기 화면의 가로, 세로 크기
UIScreen.main.bounds.width
UIScreen.main.bounds.height
현재 기기의 SafeArea Inset
let safeAreaInsetTop = UIApplication.shared.windows.first!.safeAreaInsets.top