how to get the screen height in swift 5 code example Example: swift get device screen size let screenSize: CGRect = UIScreen.main.bounds